src/vs/workbench/services/workspaces/common/workspaceTrust.ts/WorkspaceTrustManagementService/calculateWorkspaceTrust
class WorkspaceTrustManagementService:	private calculateWorkspaceTrust(): boolean {
		// Feature is disabled
		if (!this.workspaceTrustEnablementService.isWorkspaceTrustEnabled()) {
			return true;
		}

		// Canonical Uris not yet resolved
		if (!this._canonicalUrisResolved) {
			return false;
		}

		// Remote - resolver explicitly sets workspace trust to TRUE
		if (this.environmentService.remoteAuthority && this._remoteAuthority?.options?.isTrusted) {
			return this._remoteAuthority.options.isTrusted;
		}

		// Empty workspace - use memento, open ediors, or user setting
		if (this.isEmptyWorkspace()) {
			// Use memento if present
			if (this._storedTrustState.isEmptyWorkspaceTrusted !== undefined) {
				return this._storedTrustState.isEmptyWorkspaceTrusted;
			}

			// Startup files
			if (this._canonicalStartupFiles.length) {
				return this.getUrisTrust(this._canonicalStartupFiles);
			}

			// User setting
			return !!this.configurationService.getValue(WORKSPACE_TRUST_EMPTY_WINDOW);
		}

		return this.getUrisTrust(this.getWorkspaceUris());
	}