From 3cdda935eea492b84b2bd594d33559f6a38e8234 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Mon, 11 Sep 2023 22:09:07 -0500 Subject: [PATCH] Make sessionScopes a trusted value --- src/authentication/authentication.ts | 2 +- src/common/telemetry.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/authentication/authentication.ts b/src/authentication/authentication.ts index 5d30aeda..47c56a33 100644 --- a/src/authentication/authentication.ts +++ b/src/authentication/authentication.ts @@ -226,7 +226,7 @@ export default class GitpodAuthenticationProvider extends Disposable implements if (sortedScopes.length !== sortedFilteredScopes.length) { this.logService.warn(`Creating session with only valid scopes ${sortedFilteredScopes.join(',')}, original scopes were ${sortedScopes.join(',')}`); } - flow.scopes = JSON.stringify(sortedFilteredScopes); + flow.sessionScopes = JSON.stringify(sortedFilteredScopes); this.telemetryService.sendUserFlowStatus('login', flow); const scopeString = sortedFilteredScopes.join(' '); diff --git a/src/common/telemetry.ts b/src/common/telemetry.ts index 7a73e78e..c24c5a11 100644 --- a/src/common/telemetry.ts +++ b/src/common/telemetry.ts @@ -10,7 +10,8 @@ import { cloneAndChange, escapeRegExpCharacters, isBuiltFromGHA, mixin } from '. import fetch from 'node-fetch-commonjs'; export const TRUSTED_VALUES = new Set([ - 'gitpodHost' + 'gitpodHost', + 'sessionScopes' ]); export interface TelemetryEventProperties {