aaif-goose / aaif-goose/goose

Define safe Git branch switching for executable repository filters

Open
#11,706 0 comments 0 reactions 1 assignee Assigned to @jbg View on GitHub
Dominant language
Rust
Stars
54.2k
Forks
6.2k
Avg merge
3d 4h
Merged PRs (30d)
240

Description

**What problem would this solve?**

The desktop app switches branches by invoking `git checkout` inside the selected repository. Git may execute repository-local hooks and configured smudge/process filters while materializing the branch, so a navigation action can run native commands that are not visible in the Goose UI.

**What would a good outcome look like?**

Branch switching has an explicit repository-trust model and does not unexpectedly execute untrusted native commands. Legitimate Git LFS and custom-filter users have clear, intentional behavior rather than silent breakage.

**Possible approaches**

- Run checkout with hooks disabled and an isolated configuration that suppresses executable filters.
- Detect executable hooks or filters and require an explicit repository-trust confirmation before switching.
- Limit the built-in switcher to repositories whose materialization does not require native filter commands, with a clear fallback to an external Git client.

The design should separately cover post-checkout hooks, smudge/process filters, Git LFS, local versus global configuration, and existing trusted repositories.

**Additional context**

- [x] I have verified this does not duplicate an existing feature request

Do not begin implementation until the issue reaches **Ready** on the [Goose Issues board](https://github.com/orgs/aaif-goose/projects/1).

Contributor guide

Open the contributing guide

Research direction

Look at the code that invokes `git checkout` in the desktop app, likely in a repository interaction module. Understand how Git hooks and filters are configured (local vs global). Research Git's `-c` flag for isolated configuration and the `--no-optional-locks` or hook-disabling options. The outcome is a design that safely switches branches without executing untrusted commands, requiring changes to the Git command invocation and possibly a repository trust model.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli, developer-experience, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.