Skip to content

fix(git): drop safe.directory=* and fetch.pruneTags, fix deprecated keys and whichside colours (#66) - #92

Draft
AH-Merii wants to merge 1 commit into
mainfrom
fix/git-config-hardening
Draft

AH-Merii wants to merge 1 commit into
mainfrom
fix/git-config-hardening

Conversation

@AH-Merii

@AH-Merii AH-Merii commented Sep 7, 2026

Copy link
Copy Markdown
Owner

[safe] directory = * opts out of git's ownership check completely, and this config also sets core.fsmonitor = true, so cd-ing into a repo owned by another user was enough to have git run a command from that repo's config on the next git status. Per-machine exceptions belong in the untracked config.local, and a safe.directory there is still read as protected configuration, so nothing is given up by removing the blanket one.

fetch.pruneTags deletes any local tag that is not on the remote, so local-only tags disappeared on every fetch.

The rest is drift: a versionsort key that is now a deprecated alias, a core.pager width check that errored with TERM unset, an alias that only worked through prefix abbreviation, and git-whichside printing \033[1m literally because sh is bash here and its echo does not interpret escapes.

Closes #66

…eys and whichside colours (#66)

safe.directory = * disabled the ownership check that CVE-2022-24765 relies on, and
core.fsmonitor = true made a foreign-owned repo an easy vector; per-machine entries
go in config.local instead. fetch.pruneTags with fetch.prune deleted unpushed local
tags on every fetch, and with fetch.all churned tags present on one remote only.

Also: versionsort.prereleaseSuffix -> versionsort.suffix (deprecated alias), guard
the core.pager tput call when TERM is unset, spell out rm --cached in the untrack
alias, and build git-whichside colours with printf since bash's echo (/bin/sh on
Arch) prints \033 from a variable literally.

filter.lfs.required stays; git-lfs is now installed by mise and listed under
Requirements. README brought in line: no safe.directory recommendation, credential /
LFS / include sections added so the reference really covers every option, key
rotation notes allowed_signers and the GitHub upload, and the key path example
matches ggh's name_lower (github_jane-doe).

@AH-Merii AH-Merii left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the record​

bat = "latest"
eza = "latest"
delta = "latest"
# base/git/.config/git/config sets filter.lfs.required, so LFS checkouts fail without this

@AH-Merii AH-Merii Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw: I added git-lfs here because we were not installing it anywhere, not in pkglist/ and not in the Brewfile, even though base/git/.config/git/config already sets filter.lfs.required = true. So an LFS clone would have failed on any machine set up from this repo, and the next mise install is what makes that setting honest.

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.

git config: safe.directory=* re-opens CVE-2022-24765; fetch.pruneTags deletes unpushed tags; deprecated keys; whichside colours

1 participant