Skip to content

Commit

Permalink
[Code]: raise default security level (#33956)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored Mar 28, 2019
1 parent 188123b commit 4b2c60f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"@babel/runtime": "^7.3.4",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "9.5.0",
"@elastic/javascript-typescript-langserver": "^0.1.19",
"@elastic/javascript-typescript-langserver": "^0.1.20",
"@elastic/lsp-extension": "^0.1.1",
"@elastic/node-crypto": "0.1.2",
"@elastic/numeral": "2.3.2",
Expand Down
12 changes: 9 additions & 3 deletions x-pack/plugins/code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,20 @@ export const code = (kibana: any) =>
repos: Joi.array().default([]),
security: Joi.object({
enableMavenImport: Joi.boolean().default(true),
enableGradleImport: Joi.boolean().default(true),
enableGradleImport: Joi.boolean().default(false),
installNodeDependency: Joi.boolean().default(true),
gitHostWhitelist: Joi.array()
.items(Joi.string())
.default([]),
.default([
'github.com',
'gitlab.com',
'bitbucket.org',
'gitbox.apache.org',
'eclipse.org',
]),
gitProtocolWhitelist: Joi.array()
.items(Joi.string())
.default([]),
.default(['https', 'git']),
}).default(),
maxWorkspace: Joi.number().default(5), // max workspace folder for each language server
disableScheduler: Joi.boolean().default(true), // Temp option to disable all schedulers.
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/code/server/lsp/ts_launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class TypescriptServerLauncher implements ILanguageServerLauncher {
await proxy.connect();
return new RequestExpander(proxy, builtinWorkspace, maxWorkspace, this.options, {
installNodeDependency: this.options.security.installNodeDependency,
gitHostWhitelist: this.options.security.gitHostWhitelist,
});
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,10 @@
oppsy "2.x.x"
pumpify "1.3.x"

"@elastic/javascript-typescript-langserver@^0.1.19":
version "0.1.19"
resolved "https://registry.yarnpkg.com/@elastic/javascript-typescript-langserver/-/javascript-typescript-langserver-0.1.19.tgz#64558f31581dabe23d33313042d7d7c586c1a683"
integrity sha512-RStwxW40Zy0Are6M0se3CiQzgDAJScVEioTk5GQgiKZkpNNJ8C+AhMMZ9CSm4fzp7vRIQ8jzHuS5o2dHv5hy2A==
"@elastic/javascript-typescript-langserver@^0.1.20":
version "0.1.20"
resolved "https://registry.yarnpkg.com/@elastic/javascript-typescript-langserver/-/javascript-typescript-langserver-0.1.20.tgz#5fee961be352d5869db47c290c2aaf5a4c047635"
integrity sha512-oc74IO+kSy12obuKY21XjKa8yl6tVqO/h3HquIWQbg4Oc5qKBalyjr9cYH9HVxT2d1fIlWJ+VN0EBqd2K+Xo7Q==
dependencies:
"@elastic/lsp-extension" "^0.1.1"
javascript-typescript-langserver "^2.11.3"
Expand Down

0 comments on commit 4b2c60f

Please sign in to comment.