[Flight] Taint APIs (#27445)

This lets a registered object or value be "tainted", which we block from
crossing the serialization boundary. It's only allowed to stay
in-memory.

This is an extra layer of protection against mistakes of transferring
data from a data access layer to a client. It doesn't provide perfect
protection, because it doesn't trace through derived values and
substrings. So it shouldn't be used as the only security layer but more
layers are better.

`taintObjectReference` is for specific object instances, not any nested
objects or values inside that object. It's useful to avoid specific
objects from getting passed as is. It ensures that you don't
accidentally leak values in a specific context. It can be for security
reasons like tokens, privacy reasons like personal data or performance
reasons like avoiding passing large objects over the wire.

It might be privacy violation to leak the age of a specific user, but
the number itself isn't blocked in any other context. As soon as the
value is extracted and passed specifically without the object, it can
therefore leak.

`taintUniqueValue` is useful for high entropy values such as hashes,
tokens or crypto keys that are very unique values. In that case it can
be useful to taint the actual primitive values themselves. These can be
encoded as a string, bigint or typed array. We don't currently check for
this value in a substring or inside other typed arrays.

Since values can be created from different sources they don't just
follow garbage collection. In this case an additional object must be
provided that defines the life time of this value for how long it should
be blocked. It can be `globalThis` for essentially forever, but that
risks leaking memory for ever when you're dealing with dynamic values
like reading a token from a database. So in that case the idea is that
you pass the object that might end up in cache.

A request is the only thing that is expected to do any work. The
principle is that you can derive values from out of a tainted
entry during a request. Including stashing it in a per request cache.
What you can't do is store a derived value in a global module level
cache. At least not without also tainting the object.
This commit is contained in:
Sebastian Markbåge 2023-10-02 13:55:39 -04:00 committed by GitHub
parent 54baa7997c
commit 843ec07021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 540 additions and 5 deletions

View File

@ -506,6 +506,7 @@ module.exports = {
Thenable: 'readonly',
TimeoutID: 'readonly',
WheelEventHandler: 'readonly',
FinalizationRegistry: 'readonly',
spyOnDev: 'readonly',
spyOnDevAndProd: 'readonly',

View File

@ -10,6 +10,23 @@
'use strict';
const heldValues = [];
let finalizationCallback;
function FinalizationRegistryMock(callback) {
finalizationCallback = callback;
}
FinalizationRegistryMock.prototype.register = function (target, heldValue) {
heldValues.push(heldValue);
};
global.FinalizationRegistry = FinalizationRegistryMock;
function gc() {
for (let i = 0; i < heldValues.length; i++) {
finalizationCallback(heldValues[i]);
}
heldValues.length = 0;
}
let act;
let use;
let startTransition;
@ -1446,4 +1463,202 @@ describe('ReactFlight', () => {
);
});
});
// @gate enableTaint
it('errors when a tainted object is serialized', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
const user = {
name: 'Seb',
age: 'rather not say',
};
ReactServer.experimental_taintObjectReference(
"Don't pass the raw user object to the client",
user,
);
const errors = [];
ReactNoopFlightServer.render(<User user={user} />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual(["Don't pass the raw user object to the client"]);
});
// @gate enableTaint
it('errors with a specific message when a tainted function is serialized', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
function change() {}
ReactServer.experimental_taintObjectReference(
'A change handler cannot be passed to a client component',
change,
);
const errors = [];
ReactNoopFlightServer.render(<User onChange={change} />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual([
'A change handler cannot be passed to a client component',
]);
});
// @gate enableTaint
it('errors when a tainted string is serialized', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
const process = {
env: {
SECRET: '3e971ecc1485fe78625598bf9b6f85db',
},
};
ReactServer.experimental_taintUniqueValue(
'Cannot pass a secret token to the client',
process,
process.env.SECRET,
);
const errors = [];
ReactNoopFlightServer.render(<User token={process.env.SECRET} />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual(['Cannot pass a secret token to the client']);
// This just ensures the process object is kept alive for the life time of
// the test since we're simulating a global as an example.
expect(process.env.SECRET).toBe('3e971ecc1485fe78625598bf9b6f85db');
});
// @gate enableTaint
it('errors when a tainted bigint is serialized', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
const currentUser = {
name: 'Seb',
token: BigInt('0x3e971ecc1485fe78625598bf9b6f85dc'),
};
ReactServer.experimental_taintUniqueValue(
'Cannot pass a secret token to the client',
currentUser,
currentUser.token,
);
function App({user}) {
return <User token={user.token} />;
}
const errors = [];
ReactNoopFlightServer.render(<App user={currentUser} />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual(['Cannot pass a secret token to the client']);
});
// @gate enableTaint && enableBinaryFlight
it('errors when a tainted binary value is serialized', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
const currentUser = {
name: 'Seb',
token: new Uint32Array([0x3e971ecc, 0x1485fe78, 0x625598bf, 0x9b6f85dd]),
};
ReactServer.experimental_taintUniqueValue(
'Cannot pass a secret token to the client',
currentUser,
currentUser.token,
);
function App({user}) {
const clone = user.token.slice();
return <User token={clone} />;
}
const errors = [];
ReactNoopFlightServer.render(<App user={currentUser} />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual(['Cannot pass a secret token to the client']);
});
// @gate enableTaint
it('keep a tainted value tainted until the end of any pending requests', async () => {
function UserClient({user}) {
return <span>{user.name}</span>;
}
const User = clientReference(UserClient);
function getUser() {
const user = {
name: 'Seb',
token: '3e971ecc1485fe78625598bf9b6f85db',
};
ReactServer.experimental_taintUniqueValue(
'Cannot pass a secret token to the client',
user,
user.token,
);
return user;
}
function App() {
const user = getUser();
const derivedValue = {...user};
// A garbage collection can happen at any time. Even before the end of
// this request. This would clean up the user object.
gc();
// We should still block the tainted value.
return <User user={derivedValue} />;
}
let errors = [];
ReactNoopFlightServer.render(<App />, {
onError(x) {
errors.push(x.message);
},
});
expect(errors).toEqual(['Cannot pass a secret token to the client']);
// After the previous requests finishes, the token can be rendered again.
errors = [];
ReactNoopFlightServer.render(
<User user={{token: '3e971ecc1485fe78625598bf9b6f85db'}} />,
{
onError(x) {
errors.push(x.message);
},
},
);
expect(errors).toEqual([]);
});
});

View File

@ -11,7 +11,11 @@ import type {Chunk, BinaryChunk, Destination} from './ReactServerStreamConfig';
import type {Postpone} from 'react/src/ReactPostpone';
import {enableBinaryFlight, enablePostpone} from 'shared/ReactFeatureFlags';
import {
enableBinaryFlight,
enablePostpone,
enableTaint,
} from 'shared/ReactFeatureFlags';
import {
scheduleWork,
@ -106,6 +110,8 @@ import {
import {getOrCreateServerContext} from 'shared/ReactServerContextRegistry';
import ReactServerSharedInternals from './ReactServerSharedInternals';
import isArray from 'shared/isArray';
import binaryToComparableString from 'shared/binaryToComparableString';
import {SuspenseException, getSuspendedThenable} from './ReactFlightThenable';
type JSONValue =
@ -192,14 +198,42 @@ export type Request = {
writtenProviders: Map<string, number>,
identifierPrefix: string,
identifierCount: number,
taintCleanupQueue: Array<string | bigint>,
onError: (error: mixed) => ?string,
onPostpone: (reason: string) => void,
toJSON: (key: string, value: ReactClientValue) => ReactJSONValue,
};
const ReactCurrentDispatcher =
ReactServerSharedInternals.ReactCurrentDispatcher;
const ReactCurrentCache = ReactServerSharedInternals.ReactCurrentCache;
const {
TaintRegistryObjects,
TaintRegistryValues,
TaintRegistryByteLengths,
TaintRegistryPendingRequests,
ReactCurrentDispatcher,
ReactCurrentCache,
} = ReactServerSharedInternals;
function throwTaintViolation(message: string) {
// eslint-disable-next-line react-internal/prod-error-codes
throw new Error(message);
}
function cleanupTaintQueue(request: Request): void {
const cleanupQueue = request.taintCleanupQueue;
TaintRegistryPendingRequests.delete(cleanupQueue);
for (let i = 0; i < cleanupQueue.length; i++) {
const entryValue = cleanupQueue[i];
const entry = TaintRegistryValues.get(entryValue);
if (entry !== undefined) {
if (entry.count === 1) {
TaintRegistryValues.delete(entryValue);
} else {
entry.count--;
}
}
}
cleanupQueue.length = 0;
}
function defaultErrorHandler(error: mixed) {
console['error'](error);
@ -235,6 +269,10 @@ export function createRequest(
const abortSet: Set<Task> = new Set();
const pingedTasks: Array<Task> = [];
const cleanupQueue: Array<string | bigint> = [];
if (enableTaint) {
TaintRegistryPendingRequests.add(cleanupQueue);
}
const hints = createHints();
const request: Request = {
status: OPEN,
@ -258,6 +296,7 @@ export function createRequest(
writtenProviders: new Map(),
identifierPrefix: identifierPrefix || '',
identifierCount: 1,
taintCleanupQueue: cleanupQueue,
onError: onError === undefined ? defaultErrorHandler : onError,
onPostpone: onPostpone === undefined ? defaultPostponeHandler : onPostpone,
// $FlowFixMe[missing-this-annot]
@ -781,6 +820,18 @@ function serializeTypedArray(
tag: string,
typedArray: $ArrayBufferView,
): string {
if (enableTaint) {
if (TaintRegistryByteLengths.has(typedArray.byteLength)) {
// If we have had any tainted values of this length, we check
// to see if these bytes matches any entries in the registry.
const tainted = TaintRegistryValues.get(
binaryToComparableString(typedArray),
);
if (tainted !== undefined) {
throwTaintViolation(tainted.message);
}
}
}
request.pendingChunks += 2;
const bufferId = request.nextChunkId++;
// TODO: Convert to little endian if that's not the server default.
@ -959,6 +1010,12 @@ function resolveModelToJSON(
}
if (typeof value === 'object') {
if (enableTaint) {
const tainted = TaintRegistryObjects.get(value);
if (tainted !== undefined) {
throwTaintViolation(tainted);
}
}
if (isClientReference(value)) {
return serializeClientReference(request, parent, key, (value: any));
// $FlowFixMe[method-unbinding]
@ -1091,6 +1148,12 @@ function resolveModelToJSON(
}
if (typeof value === 'string') {
if (enableTaint) {
const tainted = TaintRegistryValues.get(value);
if (tainted !== undefined) {
throwTaintViolation(tainted.message);
}
}
// TODO: Maybe too clever. If we support URL there's no similar trick.
if (value[value.length - 1] === 'Z') {
// Possibly a Date, whose toJSON automatically calls toISOString
@ -1122,6 +1185,12 @@ function resolveModelToJSON(
}
if (typeof value === 'function') {
if (enableTaint) {
const tainted = TaintRegistryObjects.get(value);
if (tainted !== undefined) {
throwTaintViolation(tainted);
}
}
if (isClientReference(value)) {
return serializeClientReference(request, parent, key, (value: any));
}
@ -1171,6 +1240,12 @@ function resolveModelToJSON(
}
if (typeof value === 'bigint') {
if (enableTaint) {
const tainted = TaintRegistryValues.get(value);
if (tainted !== undefined) {
throwTaintViolation(tainted.message);
}
}
return serializeBigInt(value);
}
@ -1198,6 +1273,9 @@ function logRecoverableError(request: Request, error: mixed): string {
}
function fatalError(request: Request, error: mixed): void {
if (enableTaint) {
cleanupTaintQueue(request);
}
// This is called outside error handling code such as if an error happens in React internals.
if (request.destination !== null) {
request.status = CLOSED;
@ -1522,6 +1600,9 @@ function flushCompletedChunks(
flushBuffered(destination);
if (request.pendingChunks === 0) {
// We're done.
if (enableTaint) {
cleanupTaintQueue(request);
}
close(destination);
}
}

View File

@ -7,10 +7,27 @@
import ReactCurrentDispatcher from './ReactCurrentDispatcher';
import ReactCurrentCache from './ReactCurrentCache';
import {
TaintRegistryObjects,
TaintRegistryValues,
TaintRegistryByteLengths,
TaintRegistryPendingRequests,
} from './ReactTaintRegistry';
import {enableTaint} from 'shared/ReactFeatureFlags';
const ReactServerSharedInternals = {
ReactCurrentDispatcher,
ReactCurrentCache,
};
if (enableTaint) {
ReactServerSharedInternals.TaintRegistryObjects = TaintRegistryObjects;
ReactServerSharedInternals.TaintRegistryValues = TaintRegistryValues;
ReactServerSharedInternals.TaintRegistryByteLengths =
TaintRegistryByteLengths;
ReactServerSharedInternals.TaintRegistryPendingRequests =
TaintRegistryPendingRequests;
}
export default ReactServerSharedInternals;

View File

@ -14,6 +14,12 @@ export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './R
export {default as __SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactServerSharedInternals';
// These are server-only
export {
taintUniqueValue as experimental_taintUniqueValue,
taintObjectReference as experimental_taintObjectReference,
} from './ReactTaint';
export {
Children,
Fragment,

View File

@ -0,0 +1,138 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import {enableTaint, enableBinaryFlight} from 'shared/ReactFeatureFlags';
import binaryToComparableString from 'shared/binaryToComparableString';
import ReactServerSharedInternals from './ReactServerSharedInternals';
const {
TaintRegistryObjects,
TaintRegistryValues,
TaintRegistryByteLengths,
TaintRegistryPendingRequests,
} = ReactServerSharedInternals;
interface Reference {}
// This is the shared constructor of all typed arrays.
const TypedArrayConstructor = Object.getPrototypeOf(
Uint32Array.prototype,
).constructor;
const defaultMessage =
'A tainted value was attempted to be serialized to a Client Component or Action closure. ' +
'This would leak it to the client.';
function cleanup(entryValue: string | bigint): void {
const entry = TaintRegistryValues.get(entryValue);
if (entry !== undefined) {
TaintRegistryPendingRequests.forEach(function (requestQueue) {
requestQueue.push(entryValue);
entry.count++;
});
if (entry.count === 1) {
TaintRegistryValues.delete(entryValue);
} else {
entry.count--;
}
}
}
// If FinalizationRegistry doesn't exist, we assume that objects life forever.
// E.g. the whole VM is just the lifetime of a request.
const finalizationRegistry =
typeof FinalizationRegistry === 'function'
? new FinalizationRegistry(cleanup)
: null;
export function taintUniqueValue(
message: ?string,
lifetime: Reference,
value: string | bigint | $ArrayBufferView,
): void {
if (!enableTaint) {
throw new Error('Not implemented.');
}
// eslint-disable-next-line react-internal/safe-string-coercion
message = '' + (message || defaultMessage);
if (
lifetime === null ||
(typeof lifetime !== 'object' && typeof lifetime !== 'function')
) {
throw new Error(
'To taint a value, a lifetime must be defined by passing an object that holds ' +
'the value.',
);
}
let entryValue: string | bigint;
if (typeof value === 'string' || typeof value === 'bigint') {
// Use as is.
entryValue = value;
} else if (
enableBinaryFlight &&
(value instanceof TypedArrayConstructor || value instanceof DataView)
) {
// For now, we just convert binary data to a string so that we can just use the native
// hashing in the Map implementation. It doesn't really matter what form the string
// take as long as it's the same when we look it up.
// We're not too worried about collisions since this should be a high entropy value.
TaintRegistryByteLengths.add(value.byteLength);
entryValue = binaryToComparableString(value);
} else {
const kind = value === null ? 'null' : typeof value;
if (kind === 'object' || kind === 'function') {
throw new Error(
'taintUniqueValue cannot taint objects or functions. Try taintObjectReference instead.',
);
}
throw new Error(
'Cannot taint a ' +
kind +
' because the value is too general and not unique enough to block globally.',
);
}
const existingEntry = TaintRegistryValues.get(entryValue);
if (existingEntry === undefined) {
TaintRegistryValues.set(entryValue, {
message,
count: 1,
});
} else {
existingEntry.count++;
}
if (finalizationRegistry !== null) {
finalizationRegistry.register(lifetime, entryValue);
}
}
export function taintObjectReference(
message: ?string,
object: Reference,
): void {
if (!enableTaint) {
throw new Error('Not implemented.');
}
// eslint-disable-next-line react-internal/safe-string-coercion
message = '' + (message || defaultMessage);
if (typeof object === 'string' || typeof object === 'bigint') {
throw new Error(
'Only objects or functions can be passed to taintObjectReference. Try taintUniqueValue instead.',
);
}
if (
object === null ||
(typeof object !== 'object' && typeof object !== 'function')
) {
throw new Error(
'Only objects or functions can be passed to taintObjectReference.',
);
}
TaintRegistryObjects.set(object, message);
}

View File

@ -0,0 +1,27 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
interface Reference {}
type TaintEntry = {
message: string,
count: number,
};
export const TaintRegistryObjects: WeakMap<Reference, string> = new WeakMap();
export const TaintRegistryValues: Map<string | bigint, TaintEntry> = new Map();
// Byte lengths of all binary values we've ever seen. We don't both refcounting this.
// We expect to see only a few lengths here such as the length of token.
export const TaintRegistryByteLengths: Set<number> = new Set();
// When a value is finalized, it means that it has been removed from any global caches.
// No future requests can get a handle on it but any ongoing requests can still have
// a handle on it. It's still tainted until that happens.
type RequestCleanupQueue = Array<string | bigint>;
export const TaintRegistryPendingRequests: Set<RequestCleanupQueue> = new Set();

View File

@ -86,6 +86,8 @@ export const enableFormActions = __EXPERIMENTAL__;
export const enableBinaryFlight = __EXPERIMENTAL__;
export const enableTaint = __EXPERIMENTAL__;
export const enablePostpone = __EXPERIMENTAL__;
export const enableTransitionTracing = false;

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
// Turns a TypedArray or ArrayBuffer into a string that can be used for comparison
// in a Map to see if the bytes are the same.
export default function binaryToComparableString(
view: $ArrayBufferView,
): string {
return String.fromCharCode.apply(
String,
new Uint8Array(view.buffer, view.byteOffset, view.byteLength),
);
}

View File

@ -38,6 +38,7 @@ export const enableCacheElement = true;
export const enableFetchInstrumentation = false;
export const enableFormActions = true; // Doesn't affect Native
export const enableBinaryFlight = true;
export const enableTaint = true;
export const enablePostpone = false;
export const enableSchedulerDebugging = false;
export const debugRenderPhaseSideEffectsForStrictMode = true;

View File

@ -25,6 +25,7 @@ export const enableCacheElement = false;
export const enableFetchInstrumentation = false;
export const enableFormActions = true; // Doesn't affect Native
export const enableBinaryFlight = true;
export const enableTaint = true;
export const enablePostpone = false;
export const disableJavaScriptURLs = false;
export const disableCommentsAsDOMContainers = true;

View File

@ -25,6 +25,7 @@ export const enableCacheElement = __EXPERIMENTAL__;
export const enableFetchInstrumentation = true;
export const enableFormActions = true; // Doesn't affect Test Renderer
export const enableBinaryFlight = true;
export const enableTaint = true;
export const enablePostpone = false;
export const disableJavaScriptURLs = false;
export const disableCommentsAsDOMContainers = true;

View File

@ -25,6 +25,7 @@ export const enableCacheElement = true;
export const enableFetchInstrumentation = false;
export const enableFormActions = true; // Doesn't affect Test Renderer
export const enableBinaryFlight = true;
export const enableTaint = true;
export const enablePostpone = false;
export const disableJavaScriptURLs = false;
export const disableCommentsAsDOMContainers = true;

View File

@ -25,6 +25,7 @@ export const enableCacheElement = true;
export const enableFetchInstrumentation = false;
export const enableFormActions = true; // Doesn't affect Test Renderer
export const enableBinaryFlight = true;
export const enableTaint = true;
export const enablePostpone = false;
export const enableSchedulerDebugging = false;
export const disableJavaScriptURLs = false;

View File

@ -75,6 +75,7 @@ export const enableFetchInstrumentation = false;
export const enableFormActions = false;
export const enableBinaryFlight = true;
export const enableTaint = false;
export const enablePostpone = false;

View File

@ -477,5 +477,10 @@
"489": "Expected to see a component of type \"%s\" in this slot. The tree doesn't match so React will fallback to client rendering.",
"490": "Expected to see a Suspense boundary in this slot. The tree doesn't match so React will fallback to client rendering.",
"491": "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.",
"492": "The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components."
"492": "The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.",
"493": "To taint a value, a lifetime must be defined by passing an object that holds the value.",
"494": "taintUniqueValue cannot taint objects or functions. Try taintObjectReference instead.",
"495": "Cannot taint a %s because the value is too general and not unique enough to block globally.",
"496": "Only objects or functions can be passed to taintObjectReference. Try taintUniqueValue instead.",
"497": "Only objects or functions can be passed to taintObjectReference."
}

View File

@ -24,6 +24,8 @@ declare var queueMicrotask: (fn: Function) => void;
declare var reportError: (error: mixed) => void;
declare var AggregateError: Class<Error>;
declare var FinalizationRegistry: any;
declare module 'create-react-class' {
declare var exports: React$CreateClass;
}

View File

@ -31,6 +31,9 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',

View File

@ -31,6 +31,7 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',

View File

@ -31,6 +31,9 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',

View File

@ -31,6 +31,9 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',

View File

@ -31,6 +31,9 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',

View File

@ -30,6 +30,9 @@ module.exports = {
Reflect: 'readonly',
globalThis: 'readonly',
FinalizationRegistry: 'readonly',
// Vendor specific
MSApp: 'readonly',
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',