Prevent injection of expired "DST Root CA X3" from host CA stores; Electron to 13.6 (#4185)

This commit is contained in:
chh authored and GitHub committed 2021-11-02 18:16:10 +02:00
1 parent 7ba359be03
commit b06c33383b
14 files changed
+216 -27

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ import v8 from "v8";
import * as yaml from "js-yaml";
import type { HelmRepo } from "./helm-repo-manager";
import logger from "../logger";
import { promiseExecFile } from "../promise-exec";
import { promiseExecFile } from "../../common/utils/promise-exec";
import { helmCli } from "./helm-cli";
import type { RepoHelmChartList } from "../../common/k8s-api/endpoints/helm-charts.api";
import { iter, sortCharts } from "../../common/utils";
+1 -1
View File
@@ -22,7 +22,7 @@
import * as tempy from "tempy";
import fse from "fs-extra";
import * as yaml from "js-yaml";
import { promiseExec } from "../promise-exec";
import { promiseExec } from "../../common/utils/promise-exec";
import { helmCli } from "./helm-cli";
import type { Cluster } from "../cluster";
import { toCamelCase } from "../../common/utils/camelCase";
+1 -1
View File
@@ -21,7 +21,7 @@
import yaml from "js-yaml";
import { readFile } from "fs-extra";
import { promiseExec } from "../promise-exec";
import { promiseExec } from "../../common/utils/promise-exec";
import { helmCli } from "./helm-cli";
import { Singleton } from "../../common/utils/singleton";
import { customRequestPromise } from "../../common/request";
+5 -3
View File
@@ -21,7 +21,7 @@
// Main process
import "../common/system-ca";
import { injectSystemCAs } from "../common/system-ca";
import { initialize as initializeRemote } from "@electron/remote/main";
import * as Mobx from "mobx";
import * as LensExtensionsCommonApi from "../extensions/common-api";
@@ -66,13 +66,15 @@ import { initTray } from "./tray";
import { kubeApiRequest, shellApiRequest } from "./proxy-functions";
import { AppPaths } from "../common/app-paths";
injectSystemCAs();
const onCloseCleanup = disposer();
const onQuitCleanup = disposer();
SentryInit();
app.setName(appName);
logger.info(`📟 Setting ${productName} as protocol client for lens://`);
if (app.setAsDefaultProtocolClient("lens")) {
@@ -120,7 +122,7 @@ app.on("second-instance", (event, argv) => {
WindowManager.getInstance(false)?.ensureMainWindow();
});
app.on("ready", async () => {
app.on("ready", async () => {
logger.info(`🚀 Starting ${productName} from "${AppPaths.get("exe")}"`);
logger.info("🐚 Syncing shell environment");
await shellSync();
+1 -1
View File
@@ -21,7 +21,7 @@
import path from "path";
import fs from "fs";
import { promiseExec } from "./promise-exec";
import { promiseExec } from "../common/utils/promise-exec";
import logger from "./logger";
import { ensureDir, pathExists } from "fs-extra";
import * as lockFile from "proper-lockfile";
-26
View File
@@ -1,26 +0,0 @@
/**
* Copyright (c) 2021 OpenLens Authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import * as util from "util";
import { exec, execFile } from "child_process";
export const promiseExec = util.promisify(exec);
export const promiseExecFile = util.promisify(execFile);
+1 -1
View File
@@ -30,7 +30,7 @@ import logger from "./logger";
import { appEventBus } from "../common/event-bus";
import { cloneJsonObject } from "../common/utils";
import type { Patch } from "rfc6902";
import { promiseExecFile } from "./promise-exec";
import { promiseExecFile } from "../common/utils/promise-exec";
export class ResourceApplier {
constructor(protected cluster: Cluster) {}