mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
The last rung of the chain is a token the user pastes into Settings, and an enterprise personal access token pasted there was still sent to api.github.com. Settings now takes the host beside the token, defaulting to github.com, and saves both in the same provider Keychain record so the host a request is addressed to always comes from the entry that carried the token. A host no endpoint can be derived from is refused at the field instead of being stored and reported later as a terminal fetch failure, and the crafted values #1286 guarded against are refused there too. Clearing the token clears the host with it, so a stale tenant can never be paired with the next token. The record's decoding moves into an extension and reads every key with decodeIfPresent: Swift's synthesized init(from:) ignores a property's default and throws on a missing key, so adding a field would otherwise make every credential saved before it unreadable — for every provider, not just Copilot. The dormant connection row no longer promises api.github.com before anything has been fetched; it names a host only once one has answered. Tests cover the three new host sources with a hostile value each, the rung wiring for all five rungs, the gh hosts.yml key scan, and that a record written before the host field still decodes. |
||
|---|---|---|
| .. | ||
| Data | ||
| Resources/ProviderIcons | ||
| Security | ||
| Theme | ||
| Views | ||
| AppStore.swift | ||
| AppVersion.swift | ||
| CapacityDockController.swift | ||
| CapacityDockMotion.swift | ||
| CapacityDockPlacement.swift | ||
| CapacityDockPointerUpdateCoalescer.swift | ||
| CodeBurnApp.swift | ||
| CurrencyState.swift | ||
| MenubarScope.swift | ||
| MenubarSecondRow.swift | ||
| ProviderIcon.swift | ||
| QuotaRefreshDecision.swift | ||
| RefreshCadence.swift | ||
| SessionCountLabel.swift | ||
| StatusItemContextMenuPolicy.swift | ||
| StatusItemPlacementPolicy.swift | ||