Skip to content

Commit 36ad33a

Browse files
committed
Update dependencies:
* Update to Java 8u121 * Update to nwjs v0.19.5 * Update to jetty 9.3.15 * Update to dependency-check-core 1.4.4
1 parent 57badf1 commit 36ad33a

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

codepulse/src/main/scala/com/secdec/codepulse/dependencycheck/DependencyCheck.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.owasp.dependencycheck.data.nvdcve._
2828
import org.owasp.dependencycheck.data.update.UpdateService
2929
import org.owasp.dependencycheck.dependency.Dependency
3030
import org.owasp.dependencycheck.reporting.ReportGenerator
31-
import org.owasp.dependencycheck.utils.{ LogUtils, Settings => DepCheckSettings }
31+
import org.owasp.dependencycheck.utils.{ Settings => DepCheckSettings }
3232

3333
sealed trait DependencyCheckStatus
3434
sealed trait TransientDependencyCheckStatus extends DependencyCheckStatus

codepulse/src/main/scala/com/secdec/codepulse/dependencycheck/Settings.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import java.io.File
2323

2424
import org.apache.commons.io.IOUtils
2525
import org.owasp.dependencycheck.reporting.ReportGenerator.{ Format => DCReportFormat }
26-
import org.owasp.dependencycheck.utils.{ LogUtils, Settings => DepCheckSettings }
26+
import org.owasp.dependencycheck.utils.{ Settings => DepCheckSettings }
2727

2828
import com.secdec.codepulse.data.model.ProjectId
2929
import com.secdec.codepulse.paths
@@ -50,7 +50,7 @@ case class Settings(
5050
DepCheckSettings.setBoolean(DepCheckSettings.KEYS.ANALYZER_JAR_ENABLED, true)
5151
DepCheckSettings.setBoolean(DepCheckSettings.KEYS.ANALYZER_ARCHIVE_ENABLED, true)
5252
DepCheckSettings.setBoolean(DepCheckSettings.KEYS.ANALYZER_NEXUS_ENABLED, true)
53-
DepCheckSettings.setBoolean(DepCheckSettings.KEYS.ANALYZER_NEXUS_PROXY, false)
53+
DepCheckSettings.setBoolean(DepCheckSettings.KEYS.ANALYZER_NEXUS_USES_PROXY, false)
5454
}
5555
}
5656

distrib/common/app/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,10 @@ exports.registerMainWindow = function(window) {
259259
// (since port number changes, so we're on a different origin every time, and therefore receive a
260260
// different localStorage)
261261
function initStorage() {
262-
var gui = global.window.nwDispatcher.requireNwGui(),
263-
path = require('path'), fs = require('fs');
262+
var path = require('path'), fs = require('fs');
264263

265264
var storage = {},
266-
storeFile = path.join(gui.App.dataPath, 'storage.json');
265+
storeFile = path.join(nw.App.dataPath, 'storage.json');
267266

268267
function loadStorage() {
269268
try {

distrib/common/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
"name": "Code Pulse",
33
"main": "app/startup.html",
44
"node-main": "app/main.js",
5-
"node-remote": "<local>",
6-
"user-agent": "CodePulse (node-webkit)",
5+
"node-remote": [ "http://localhost/*", "https://localhost/*", "http://127.0.0.1/*", "https://127.0.0.1/*" ],
6+
"user-agent": "Code Pulse (nwjs)",
77
"window": {
88
"title": "Code Pulse",
99
"icon": "app/icon.png",
10-
"toolbar": false,
1110
"width": 1024,
1211
"height": 768,
1312
"min_width": 960,

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ object Dependencies {
6161
}
6262

6363
// dependency-check
64-
lazy val dependencyCheckCore = "org.owasp" % "dependency-check-core" % "1.2.11"
64+
lazy val dependencyCheckCore = "org.owasp" % "dependency-check-core" % "1.4.4"
6565
}

project/Distributor.scala

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,30 @@ object Distributor extends BuildExtra {
6666
object dependencies {
6767
object java {
6868
private val setOracleCookie: URLConnection => Unit = { _.setRequestProperty("Cookie", "oraclelicense=accept-securebackup-cookie") }
69-
private val trimPathRegex = raw"^\Qjre1.8.0_45\E(?:\.jre)?/".r
69+
private val trimPathRegex = raw"^\Qjre1.8.0_121\E(?:\.jre)?/".r
7070
private val trimPath: String => String = { trimPathRegex.replaceFirstIn(_, "") }
7171

72-
val win32 = Dependency("jre.win32", "8u45", "http://download.oracle.com/otn-pub/java/jdk/8u45-b15/jre-8u45-windows-i586.tar.gz")
72+
val win32 = Dependency("jre.win32", "8u121", "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-windows-i586.tar.gz")
7373
.withConnectionStep(setOracleCookie)
7474
.extractAsTarGz { trimPath }
7575
.to { _ / "distrib-dependencies" / "win32" / "jre" }
7676

77-
val win64 = Dependency("jre.win64", "8u45", "http://download.oracle.com/otn-pub/java/jdk/8u45-b15/jre-8u45-windows-x64.tar.gz")
77+
val win64 = Dependency("jre.win64", "8u121", "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-windows-x64.tar.gz")
7878
.withConnectionStep(setOracleCookie)
7979
.extractAsTarGz { trimPath }
8080
.to { _ / "distrib-dependencies" / "win64" / "jre" }
8181

82-
val linuxX86 = Dependency("jre.linux-x86", "8u45", "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-linux-i586.tar.gz")
82+
val linuxX86 = Dependency("jre.linux-x86", "8u121", "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-linux-i586.tar.gz")
8383
.withConnectionStep(setOracleCookie)
8484
.extractAsTarGz { trimPath }
8585
.to { _ / "distrib-dependencies" / "linux-x86" / "jre" }
8686

87-
val linuxX64 = Dependency("jre.linux-x64", "8u45", "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-linux-x64.tar.gz")
87+
val linuxX64 = Dependency("jre.linux-x64", "8u121", "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-linux-x64.tar.gz")
8888
.withConnectionStep(setOracleCookie)
8989
.extractAsTarGz { trimPath }
9090
.to { _ / "distrib-dependencies" / "linux-x64" / "jre" }
9191

92-
val osx = Dependency("jre.osx", "8u45", "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jre-8u45-macosx-x64.tar.gz")
92+
val osx = Dependency("jre.osx", "8u121", "http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-macosx-x64.tar.gz")
9393
.withConnectionStep(setOracleCookie)
9494
.extractAsTarGz { trimPath }
9595
.to { _ / "distrib-dependencies" / "osx" / "jre" }
@@ -99,29 +99,30 @@ object Distributor extends BuildExtra {
9999
private val trimPathRegex = raw"^nwjs-[^/]+/".r
100100
private val trimPath: String => String = { trimPathRegex.replaceFirstIn(_, "") }
101101

102-
val win32 = Dependency("nwjs.win32", "v0.12.2", "http://dl.nwjs.io/v0.12.2/nwjs-v0.12.2-win-ia32.zip")
102+
val win32 = Dependency("nwjs.win32", "v0.19.5", "https://dl.nwjs.io/v0.19.5/nwjs-v0.19.5-win-ia32.zip")
103103
.extractAsZip { trimPath }
104104
.to { _ / "distrib-dependencies" / "win32" / "nwjs" }
105105

106-
val win64 = Dependency("nwjs.win64", "v0.12.2", "http://dl.nwjs.io/v0.12.2/nwjs-v0.12.2-win-x64.zip")
106+
val win64 = Dependency("nwjs.win64", "v0.19.5", "https://dl.nwjs.io/v0.19.5/nwjs-v0.19.5-win-x64.zip")
107107
.extractAsZip { trimPath }
108108
.to { _ / "distrib-dependencies" / "win64" / "nwjs" }
109109

110-
val linuxX86 = Dependency("nwjs.linux-x86", "v0.12.2", "http://dl.nwjs.io/v0.12.2/nwjs-v0.12.2-linux-ia32.tar.gz")
110+
val linuxX86 = Dependency("nwjs.linux-x86", "v0.19.5", "https://dl.nwjs.io/v0.19.5/nwjs-v0.19.5-linux-ia32.tar.gz")
111111
.extractAsTarGz { trimPath }
112112
.to { _ / "distrib-dependencies" / "linux-x86" / "nwjs" }
113113

114-
val linuxX64 = Dependency("nwjs.linux-x64", "v0.12.2", "http://dl.nwjs.io/v0.12.2/nwjs-v0.12.2-linux-x64.tar.gz")
114+
val linuxX64 = Dependency("nwjs.linux-x64", "v0.19.5", "https://dl.nwjs.io/v0.19.5/nwjs-v0.19.5-linux-x64.tar.gz")
115115
.extractAsTarGz { trimPath }
116116
.to { _ / "distrib-dependencies" / "linux-x64" / "nwjs" }
117117

118-
val osx = Dependency("nwjs.osx", "v0.12.2", "http://dl.nwjs.io/v0.12.2/nwjs-v0.12.2-osx-x64.zip")
118+
val osx = Dependency("nwjs.osx", "v0.19.5", "https://dl.nwjs.io/v0.19.5/nwjs-v0.19.5-osx-x64.zip")
119119
.extractAsZip { trimPath }
120120
.to { _ / "distrib-dependencies" / "osx" / "nwjs" }
121121
}
122122

123-
val jetty = Dependency("jetty", "9.3.3.v20150827", "http://mirrors.xmission.com/eclipse/jetty/stable-9/dist/jetty-distribution-9.3.3.v20150827.zip")
124-
.extractAsZip { raw"^\Qjetty-distribution-9.3.3.v20150827\E/".r.replaceFirstIn(_, "") }
123+
124+
val jetty = Dependency("jetty", "9.3.15.v20161220", "http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.3.15.v20161220/jetty-distribution-9.3.15.v20161220.zip")
125+
.extractAsZip { raw"^\Qjetty-distribution-9.3.15.v20161220\E/".r.replaceFirstIn(_, "") }
125126
.to { _ / "distrib-dependencies" / "common" / "jetty" }
126127

127128
object tools {
@@ -262,7 +263,7 @@ object Distributor extends BuildExtra {
262263
def rewritePath(path: String) = s"$root/Code Pulse.app" + path.stripPrefix(s"$root/nwjs.app")
263264

264265
nwkFiles flatMap {
265-
case ZipEntry(_, path, mode) if path == s"$root/nwjs.app/Contents/Resources/nw.icns" =>
266+
case ZipEntry(_, path, mode) if path == s"$root/nwjs.app/Contents/Resources/app.icns" =>
266267
// swap in our icon
267268
val icns = app / "app" / "icon.icns"
268269
Some(ZipEntry(icns, rewritePath(path), mode))
@@ -298,6 +299,8 @@ object Distributor extends BuildExtra {
298299

299300
Some(ZipEntry(customizedInfo, rewritePath(path), mode))
300301

302+
case ZipEntry(_, path, _) if path matches raw"$root/nwjs\.app/Contents/Resources/\w+\.lproj(?:/.*|$$)" => log.info(s"Excluding localization: $path"); None
303+
301304
case ZipEntry(file, path, mode) if path startsWith s"$root/nwjs.app" =>
302305
Some(ZipEntry(file, rewritePath(path), mode))
303306

0 commit comments

Comments
 (0)