@vscode/gulp-electron 1.35.0 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SECURITY.md +41 -0
- package/azure-pipelines.yml +3 -3
- package/package.json +5 -4
- package/src/download.js +14 -11
- package/src/index.js +10 -0
- package/src/win32.js +5 -5
package/SECURITY.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->
|
|
2
|
+
|
|
3
|
+
## Security
|
|
4
|
+
|
|
5
|
+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
|
6
|
+
|
|
7
|
+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
|
|
8
|
+
|
|
9
|
+
## Reporting Security Issues
|
|
10
|
+
|
|
11
|
+
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
12
|
+
|
|
13
|
+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
|
|
14
|
+
|
|
15
|
+
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
|
|
16
|
+
|
|
17
|
+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
|
|
18
|
+
|
|
19
|
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
20
|
+
|
|
21
|
+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
22
|
+
* Full paths of source file(s) related to the manifestation of the issue
|
|
23
|
+
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
24
|
+
* Any special configuration required to reproduce the issue
|
|
25
|
+
* Step-by-step instructions to reproduce the issue
|
|
26
|
+
* Proof-of-concept or exploit code (if possible)
|
|
27
|
+
* Impact of the issue, including how an attacker might exploit the issue
|
|
28
|
+
|
|
29
|
+
This information will help us triage your report more quickly.
|
|
30
|
+
|
|
31
|
+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
|
|
32
|
+
|
|
33
|
+
## Preferred Languages
|
|
34
|
+
|
|
35
|
+
We prefer all communications to be in English.
|
|
36
|
+
|
|
37
|
+
## Policy
|
|
38
|
+
|
|
39
|
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
|
|
40
|
+
|
|
41
|
+
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
package/azure-pipelines.yml
CHANGED
|
@@ -29,11 +29,11 @@ extends:
|
|
|
29
29
|
- script: npm ci
|
|
30
30
|
testPlatforms:
|
|
31
31
|
- name: Linux
|
|
32
|
-
nodeVersions: [
|
|
32
|
+
nodeVersions: [22.x, 24.x]
|
|
33
33
|
- name: MacOS
|
|
34
|
-
nodeVersions: [
|
|
34
|
+
nodeVersions: [22.x, 24.x]
|
|
35
35
|
- name: Windows
|
|
36
|
-
nodeVersions: [
|
|
36
|
+
nodeVersions: [22.x, 24.x]
|
|
37
37
|
testSteps:
|
|
38
38
|
- script: npm ci
|
|
39
39
|
- script: npm test
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/gulp-electron",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"description": "gulp plugin for packaging Electron into VS Code",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/microsoft/vscode-gulp-electron",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@electron/get": "^
|
|
31
|
+
"@electron/get": "^4.0.1",
|
|
32
32
|
"@octokit/rest": "^18.0.14",
|
|
33
33
|
"event-stream": "3.3.4",
|
|
34
34
|
"gulp-filter": "^5.1.0",
|
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
"mkdirp": "^0.5.1",
|
|
39
39
|
"plist": "^3.0.1",
|
|
40
40
|
"progress": "^1.1.8",
|
|
41
|
-
"rcedit": "^0.
|
|
41
|
+
"rcedit": "^4.0.1",
|
|
42
42
|
"rimraf": "^2.4.2",
|
|
43
|
-
"semver": "^
|
|
43
|
+
"semver": "^7.7.2",
|
|
44
|
+
"sumchecker": "^3.0.1",
|
|
44
45
|
"temp": "^0.8.3",
|
|
45
46
|
"vinyl": "^3.0.0",
|
|
46
47
|
"vinyl-fs": "^3.0.3"
|
package/src/download.js
CHANGED
|
@@ -9,6 +9,7 @@ var zfs = require("gulp-vinyl-zip");
|
|
|
9
9
|
var filter = require("gulp-filter");
|
|
10
10
|
const { Octokit } = require("@octokit/rest");
|
|
11
11
|
const got = require("got");
|
|
12
|
+
const sumchecker = require('sumchecker');
|
|
12
13
|
|
|
13
14
|
async function getDownloadUrl(
|
|
14
15
|
ownerRepo, customTag,
|
|
@@ -87,10 +88,10 @@ async function download(opts) {
|
|
|
87
88
|
arch = "x64";
|
|
88
89
|
break;
|
|
89
90
|
case "win32":
|
|
90
|
-
arch = "
|
|
91
|
+
arch = "x64";
|
|
91
92
|
break;
|
|
92
93
|
case "linux":
|
|
93
|
-
arch = "
|
|
94
|
+
arch = "x64";
|
|
94
95
|
break;
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -139,7 +140,16 @@ async function download(opts) {
|
|
|
139
140
|
function downloadStream(opts) {
|
|
140
141
|
return es.readable(function (_, cb) {
|
|
141
142
|
download(opts).then(
|
|
142
|
-
(assets) => {
|
|
143
|
+
async (assets) => {
|
|
144
|
+
if (opts.validateChecksum) {
|
|
145
|
+
try {
|
|
146
|
+
await sumchecker('sha256', opts.checksumFile, path.dirname(assets), [
|
|
147
|
+
path.basename(assets),
|
|
148
|
+
]);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
return cb(err);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
143
153
|
zfs
|
|
144
154
|
.src(assets)
|
|
145
155
|
.on("data", (data) => this.emit("data", data))
|
|
@@ -166,16 +176,9 @@ function getDarwinLibFFMpegPath(opts) {
|
|
|
166
176
|
|
|
167
177
|
module.exports = function (opts) {
|
|
168
178
|
const downloadOpts = {
|
|
169
|
-
|
|
170
|
-
tag: opts.tag,
|
|
171
|
-
platform: opts.platform,
|
|
179
|
+
...opts,
|
|
172
180
|
arch: opts.arch === "arm" ? "armv7l" : opts.arch,
|
|
173
181
|
artifactName: "electron",
|
|
174
|
-
token: opts.token,
|
|
175
|
-
quiet: opts.quiet,
|
|
176
|
-
repo: opts.repo,
|
|
177
|
-
symbols: opts.symbols,
|
|
178
|
-
pdbs: opts.pdbs,
|
|
179
182
|
};
|
|
180
183
|
|
|
181
184
|
if (opts.symbols) {
|
package/src/index.js
CHANGED
|
@@ -88,6 +88,16 @@ function electron(opts) {
|
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
if (opts.validateChecksum) {
|
|
92
|
+
try {
|
|
93
|
+
fs.openSync(opts.checksumFile, fs.constants.R_OK);
|
|
94
|
+
} catch (err) {
|
|
95
|
+
throw new Error(`Unable to read checksum file: ${opts.checksumFile}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
opts.arch = opts.arch || process.arch;
|
|
100
|
+
|
|
91
101
|
return _electron(opts);
|
|
92
102
|
}
|
|
93
103
|
|
package/src/win32.js
CHANGED
|
@@ -93,11 +93,7 @@ function patchExecutable(opts) {
|
|
|
93
93
|
return cb(error);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
rcedit(tempPath, patch
|
|
97
|
-
if (err) {
|
|
98
|
-
return cb(err);
|
|
99
|
-
}
|
|
100
|
-
|
|
96
|
+
rcedit(tempPath, patch).then(() => {
|
|
101
97
|
fs.readFile(tempPath, function (err, data) {
|
|
102
98
|
if (err) {
|
|
103
99
|
return cb(err);
|
|
@@ -113,6 +109,10 @@ function patchExecutable(opts) {
|
|
|
113
109
|
cb(null, f);
|
|
114
110
|
});
|
|
115
111
|
});
|
|
112
|
+
}).catch(err => {
|
|
113
|
+
if (err) {
|
|
114
|
+
return cb(err);
|
|
115
|
+
}
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
118
|
});
|