UI tests: Credential Manager vault is not isolated by GCLO_DATA_DIR (the suite sees the developer's saved default token) #60

Closed
opened 2026-10-09 13:43:25 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-10-09 13:43:25 +00:00 (Migrated from github.com)

What happened

While adding the TableView UI tests (#33) the app logs from a FlaUI session showed, before any test typed anything:

Token entered in workspace 'Quick Sync' (40 characters).
Organization lookup finished: 12 organizations and accounts visible.

GCLO_DATA_DIR isolates settings, accounts and logs, but the token vault is Windows Credential Manager, which is machine-wide. MainWindow pre-fills Quick Sync from AppSettings.DefaultTokenVaultId when a default token is stored, so on a developer machine that has saved one in Settings, every UI test session starts with that real token and performs a real organization lookup against GitHub. On CI runners the vault is empty, so this is invisible there.

Why it matters

  • The suite is documented as token-free and offline; on a developer box it is neither.
  • A future test that reaches Sync could clone with the developer's token into the test's temp target folder.
  • It makes results machine-dependent (the 401 smoke test only passes because it types its own dummy token afterwards).

Proposed fix

Scope the vault by data directory when GCLO_DATA_DIR is set (e.g. prefix Credential Manager target names with a hash of the data dir), or use InMemoryVault when GCLO_UITEST_FIXTURE=1. Then add an assertion to AppSession that the connect token box is empty at launch.

Found during #33 (PR #59); see also #54 (making the UI suite required).

## What happened While adding the TableView UI tests (#33) the app logs from a FlaUI session showed, before any test typed anything: ``` Token entered in workspace 'Quick Sync' (40 characters). Organization lookup finished: 12 organizations and accounts visible. ``` `GCLO_DATA_DIR` isolates settings, accounts and logs, but the token vault is Windows Credential Manager, which is machine-wide. `MainWindow` pre-fills Quick Sync from `AppSettings.DefaultTokenVaultId` when a default token is stored, so on a developer machine that has saved one in Settings, every UI test session starts with that real token and performs a real organization lookup against GitHub. On CI runners the vault is empty, so this is invisible there. ## Why it matters - The suite is documented as token-free and offline; on a developer box it is neither. - A future test that reaches Sync could clone with the developer's token into the test's temp target folder. - It makes results machine-dependent (the 401 smoke test only passes because it types its own dummy token afterwards). ## Proposed fix Scope the vault by data directory when `GCLO_DATA_DIR` is set (e.g. prefix Credential Manager target names with a hash of the data dir), or use `InMemoryVault` when `GCLO_UITEST_FIXTURE=1`. Then add an assertion to `AppSession` that the connect token box is empty at launch. Found during #33 (PR #59); see also #54 (making the UI suite required).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/gclo#60