Repository navigation
Ignore a local config's api_url and token until it is trusted - #226
Conversation
A .fizzy.yaml is found by walking up from the working directory, so a cloned repo supplies one. Its api_url and token were applied as written, which let a repo choose the host a saved token is sent to. An untrusted local config now sets only the account and the board. Its api_url and token apply after `fizzy config trust`, which records a digest of those two values: changing either leaves the file untrusted until it is trusted again. `fizzy setup` trusts the local file it writes, `fizzy config untrust` removes the trust, and doctor reports ignored settings. With no profile chosen, the configured account names the credential. A stored profile's token now goes to that profile's own host rather than the host the YAML config or the default names.
There was a problem hiding this comment.
🟡 Changes recommended
config explain incorrectly reports the selected profile API URL as <unset> when multiple profiles have no default, even though the account-named fallback profile’s host is in use.
1 open issue
What changed in this PR
Adds explicit trust for local .fizzy.yaml credential settings, preventing untrusted project files from overriding the CLI’s API URL or token while preserving account and board defaults.
Changes:
- Adds digest-based trust storage and
config trust/config untrustcommands. - Integrates trust with setup, diagnostics, and configuration reporting; keeps account-selected credentials on their profile’s host.
- Updates tests, documentation, and the CLI surface snapshot.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
SURFACE.txt |
Records the trust and untrust command surface. |
skills/fizzy/SKILL.md |
Documents trust behavior and agent precautions. |
README.md |
Explains trust requirements and invalidation. |
internal/config/trust.go |
Implements trust-gated loading and trust storage. |
internal/config/trust_test.go |
Tests trust, invalidation, revocation, and symlinks. |
internal/config/config.go |
Applies trusted settings and warns about ignored keys. |
internal/config/config_test.go |
Trusts fixtures that require local API URLs. |
internal/commands/setup.go |
Automatically trusts the local config setup writes. |
internal/commands/root.go |
Uses the account-selected profile’s API host. |
internal/commands/doctor.go |
Reports ignored settings and profile-host attribution. |
internal/commands/doctor_test.go |
Updates the local-token fixture for trust gating. |
internal/commands/config_cmd.go |
Adds trust commands and filters explanation inputs. |
internal/commands/config_cmd_test.go |
Tests trust commands, warnings, and profile-host fallback. |
AGENTS.md |
Documents trust-aware loading requirements. |
Review effort: Balanced
There was a problem hiding this comment.
All reported issues were addressed across 14 files
You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
The host of an account-named profile now follows its credential: it applies only when that profile holds a token, so a token from another source is not carried over to it. `config explain` shows that host as the selected candidate, and shows what an untrusted local config sets as ignored. The trust store stays in the preferred config directory rather than following the global config file, and its read, change and save run under a lock with a temporary file of their own. `config untrust` finds the entry of a file or link target that is gone. `config trust` and `config untrust` run whatever the profile, account and token settings are, skip the warning about the file they act on, and report read and write failures as such rather than as usage errors. `fizzy setup` fails when it cannot trust the file it wrote. Paths in messages drop control characters.
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
A token from FIZZY_TOKEN or --token replaces the account-named profile's own, so it stays on the configured host as well. A stale trust lock that cannot be removed no longer spins: the wait runs to its deadline. `config explain` and `fizzy setup` drop control characters from the local config's values and paths they print.

What
A local
.fizzy.yamlkeeps setting the account and the board. Itsapi_urlandtokennow apply only once the file is trusted:fizzy config trust [path]trusts the nearest.fizzy.yaml(or the one atpath). It records a digest of the file'sapi_urlandtoken, so changing either leaves the file untrusted until it is trusted again.fizzy config untrust [path]removes the trust.fizzy setuptrusts the local file it writes.fizzy doctorwarns when a local config's settings are being ignored, andconfig show/config explainreport what actually applies.config trustandconfig untrustonly change local trust records, so they run whatever the profile, account and token settings are.Trust is stored in
trusted-configs.jsonin the config directory (~/.config/fizzy), updated under a lock.SURFACE.txtis regenerated for the two new commands, and the README, AGENTS.md and the skill describe the behavior.Why
A
.fizzy.yamlis found by walking up from the working directory, so it often comes from a repository someone else wrote. The account and the board are harmless to take from it. The API host and the token decide where a credential is sent and which one, so those should be the person's own choice, made once per file.Behavior change: an existing
.fizzy.yamlthat setsapi_urlortokenstops applying them untilfizzy config trustis run once in that directory. Files with onlyaccountandboardare unaffected.Testing
make checkpassesconfig explain, concurrent trust changes, and the profile host with and without a stored token.api_urlandtokenare ignored and requests go to the configured host; afterfizzy config trustthey apply; after editing the file orfizzy config untrustthey are ignored again.