fix: prevent node mode to be used as script runner by other apps (#40579)

This commit is contained in:
Cheng Zhao 2023-12-06 11:23:54 +09:00 committed by GitHub
parent 9aa73abe78
commit cb0da6ff34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 301 additions and 88 deletions

View file

@ -0,0 +1,19 @@
// Copyright 2023 Microsoft, Inc.
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_COMMON_MAC_CODESIGN_UTIL_H_
#define SHELL_COMMON_MAC_CODESIGN_UTIL_H_
#include <unistd.h>
namespace electron {
// Given a pid, check if the process belongs to current app by comparing its
// code signature with current app.
bool ProcessBelongToCurrentApp(pid_t pid);
} // namespace electron
#endif // SHELL_COMMON_MAC_CODESIGN_UTIL_H_