You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
6
6
7
7
## [Unreleased]
8
8
9
+
### Added
10
+
11
+
-`git gtr trust` now covers `.gtrconfig``defaults.editor` and `defaults.ai` entries as executable commands, preventing shared config from selecting editor or AI commands until reviewed.
**Note:** The `--merged` mode auto-detects your hosting provider (GitHub or GitLab) from the `origin` remote URL and requires the corresponding CLI tool (`gh` or `glab`) to be installed and authenticated. For self-hosted instances, set the provider explicitly: `git gtr config set gtr.provider gitlab`.
345
345
346
+
### `git gtr trust`
347
+
348
+
Review and approve executable commands defined in the repository's `.gtrconfig` file. Hooks and editor/AI defaults from `.gtrconfig` are **not used** until explicitly trusted — this prevents malicious contributors from injecting arbitrary shell commands via shared config files.
349
+
350
+
```bash
351
+
git gtr trust # Review and approve .gtrconfig commands
352
+
```
353
+
354
+
Trust is stored per repository path plus executable command definitions and must be re-approved if hooks or editor/AI defaults change. Hooks and defaults from your local git config (`.git/config`, `~/.gitconfig`) are always trusted.
355
+
346
356
### Other Commands
347
357
348
358
-`git gtr doctor` - Health check (verify git, editors, AI tools)
@@ -362,6 +372,14 @@ git gtr config set gtr.editor.default cursor
362
372
# Set your AI tool (aider, auggie, claude, codex, continue, copilot, cursor, gemini, opencode)
363
373
git gtr config set gtr.ai.default claude
364
374
375
+
# Override-backed adapters may include flags
376
+
git gtr config set gtr.editor.default "nano -w"
377
+
git gtr config set gtr.ai.default "claude --continue"
378
+
379
+
# Generic fallbacks may use other safe PATH commands
380
+
git gtr config set gtr.editor.default "code --wait"
381
+
git gtr config set gtr.ai.default "bunx @github/copilot@latest"
@@ -394,10 +412,14 @@ git gtr config set gtr.ui.color never
394
412
remote=upstream
395
413
```
396
414
415
+
**Command trust:** Hooks and editor/AI defaults defined in `.gtrconfig` require explicit approval before they execute or select tools. Run `git gtr trust` after cloning a repository or when `.gtrconfig` command entries change. This protects against malicious command injection in shared repositories.
416
+
417
+
**Adapter safety:** Generic `gtr.editor.default` and `gtr.ai.default` values must resolve to safe PATH commands. Filesystem paths such as `./tool` and shell wrapper forms such as `sh -c ...` are rejected. Override-backed adapters like `claude`, `cursor`, and `nano` may include additional flags, for example `claude --continue` or `nano -w`.
418
+
397
419
**Configuration precedence** (highest to lowest):
398
420
399
421
1. `git config --local` (`.git/config`) - personal overrides
400
-
2. `.gtrconfig` (repo root) - team defaults
422
+
2. `.gtrconfig` (repo root) - team defaults (hooks and editor/AI defaults require `git gtr trust`)
401
423
3. `git config --global` (`~/.gitconfig`) - user defaults
402
424
403
425
> For complete configuration reference including all settings, hooks, file copying patterns, and environment variables, see [docs/configuration.md](docs/configuration.md)
0 commit comments