fabric8-analytics-lsp-server
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -54,6 +54,6 @@ /* -------------------------------------------------------------------------------------------- | ||
this.changeTo = null; | ||
this.registrationLink = null; | ||
this.message = null; | ||
this.vulnerabilityCount = 0; | ||
this.advisoryCount = 0; | ||
this.exploitCount = 0; | ||
} | ||
@@ -70,5 +70,2 @@ consume(data) { | ||
} | ||
if (this.registrationLinkBinding != null) { | ||
this.registrationLink = bind_object(data, this.registrationLinkBinding); | ||
} | ||
if (this.messageBinding != null) { | ||
@@ -83,2 +80,5 @@ this.message = bind_object(data, this.messageBinding); | ||
} | ||
if (this.exploitCountBinding != null) { | ||
this.exploitCount = bind_object(data, this.exploitCountBinding); | ||
} | ||
return this.item != null; | ||
@@ -118,4 +118,2 @@ } | ||
this.changeToBinding = { path: ['recommended_versions'] }; | ||
/* snyk registration link */ | ||
this.registrationLinkBinding = { path: ['registration_link'] }; | ||
/* Diagnostic message */ | ||
@@ -127,2 +125,4 @@ this.messageBinding = { path: ['message'] }; | ||
this.advisoryCountBinding = { path: ['security_advisory_count'] }; | ||
/* Exloitable vulnerability count */ | ||
this.exploitCountBinding = { path: ['exploitable_vulnerabilities_count'] }; | ||
} | ||
@@ -146,3 +146,3 @@ produce(ctx) { | ||
// TODO: this can be done lazily | ||
if (this.changeTo && this.vulnerabilityCount > 0) { | ||
if (this.changeTo) { | ||
let codeAction = { | ||
@@ -149,0 +149,0 @@ title: "Switch to recommended version " + this.changeTo, |
{ | ||
"name": "fabric8-analytics-lsp-server", | ||
"description": "LSP Server for Dependency Analytics", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"author": "Pavel Odvody", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -137,3 +137,4 @@ /* -------------------------------------------------------------------------------------------- | ||
let summaryMsg = [knownVulnMsg, advisoryMsg].filter(x => x !== true).join(' and '); | ||
summaryMsg += (totalCount.vulnerabilityCount > 0) ? " along with quick fixes" : ""; | ||
summaryMsg += (totalCount.exploitCount > 0) ? ` with ${totalCount.exploitCount} Exploitable ${vulStr(totalCount.exploitCount)}` : ""; | ||
summaryMsg += ((totalCount.vulnerabilityCount + totalCount.advisoryCount) > 0) ? " along with quick fixes" : ""; | ||
msg += summaryMsg ? ('flagged ' + summaryMsg) : 'No potential security vulnerabilities found'; | ||
@@ -184,2 +185,3 @@ } | ||
this.advisoryCount = 0; | ||
this.exploitCount = 0; | ||
} | ||
@@ -198,2 +200,3 @@ } | ||
totalCount.advisoryCount += secEng.advisoryCount; | ||
totalCount.exploitCount += secEng.exploitCount; | ||
} | ||
@@ -200,0 +203,0 @@ connection.sendDiagnostics({ uri: diagnosticFilePath, diagnostics: diagnostics }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71872
782