Skip to content

Apply opt-in mise trust to eligible new worktrees - #77

Merged
nnutter merged 4 commits into
masterfrom
mise-trust
Oct 22, 2026
Merged

nnutter merged 4 commits into
masterfrom
mise-trust

Conversation

@nnutter

@nnutter nnutter commented Oct 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

Let users save their choice with `timber config` before worktree
creation starts using the policy. Default to disabled because trusting a
repository permits mise configuration to execute code.

Reject unknown settings so changing a value cannot silently discard
them.
Cache the authenticated github.com username and all organizations to
provide ownership evidence for the next worktree trust change. Reuse
valid entries for 24 hours to avoid repeated network requests.

Require a successful refresh when the cache is missing, malformed,
expired, or future-dated so invalid identity data cannot serve as
ownership evidence. Limit refresh time to 15 seconds and replace the
cache atomically with owner-only permissions.
Trust mise configuration after worktree creation and before opening
Herdr so eligible worktrees are ready for use when automatic trust is
explicitly enabled.

Because trusted configuration can execute code, require a regular
root-level `mise.toml` and a GitHub repository owned by the cached user
or an organization they belong to. Determine ownership from the selected
upstream's remote, including local branches that track a remote, rather
than assuming origin or relying on a registry name. Reject symlinks to
avoid trusting files outside the checkout.

Warn if a required identity cache refresh or mise trust fails, but keep
worktree creation successful. Document the security opt-in and the need
to clear the identity cache after account or membership changes.
Offer to enable automatic mise trust when an interactive user creates an
eligible worktree with trust disabled and no recorded choice. Default to
No because trusting mise configuration permits code execution.

Save either answer in a separate decision marker to distinguish an
explicit refusal from the disabled default and prevent repeated prompts.
Explicit configuration flags also record a decision. After refusal, show
`timber config --auto-mise-trust` so users can enable trust later.

Skip the prompt and identity lookup for undecided noninteractive
creation.
@nnutter
nnutter enabled auto-merge October 22, 2026 01:55
@nnutter
nnutter merged commit 3f6e07f into master Oct 22, 2026
1 check passed
@nnutter
nnutter deleted the mise-trust branch October 22, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant