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
{{ message }}
Repository navigation
Turn off config-driven commands on every git ignore check a hook runs #16959
area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.needs-triageNot yet classified. Floor until a type and one priority tier are set.
Found while fixing the security review of PR #16954 (report of the build session; call sites to re-verify with file:line): hooks run git check-ignore in the edited file's repository without -c core.fsmonitor=false. Reading the index starts the command a repository's core.fsmonitor config names. git's safe.directory check still applies there, so this needs a repository the user owns whose .git/config someone else wrote, such as an extracted archive that contains a .git/.
hook::file_is_gitignored in the shared hooks/hook-utils.sh (copied into several plugins; the format hooks appear to call it by default through hook::gitignored_out_of_scope).
spd_gitignored in plugins/guardrails/hooks/secret-pattern-detection.sh (its option secret_pattern_detection_skip_gitignored is off by default).
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the shared hooks/hook-utils.sh helper and its copies across plugins, plus plugins/guardrails/hooks/secret-pattern-detection.sh; run by every user whose hooks call git check-ignore.
Reversible: yes; revert the change to the git call wrappers and the synced copies.
Open questions: none
I understood this as follows: hook git check-ignore calls run without -c core.fsmonitor=false, so a repository whose .git/config was written by someone else (for example an extracted archive) could start a command named in its core.fsmonitor setting. You want every such hook git call to go through one shared helper that passes the overrides from PR #16954, a test with a planted core.fsmonitor showing nothing runs, and the shared copies synced. The attack needs a repository the user owns, because safe.directory still applies, so I triaged it as a medium-severity hardening bug rather than a critical exposure. I found no open duplicate and no merged fix. The call sites you list should be re-verified with file:line when the work starts.
Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).
Status, 2026-11-18 (control-hub session, melodic-software/control-hub#11). Merged against this issue: #17104, #17082 and #17260 (the format adapters, markdown-gates.sh and the reap helper now go through hook::git_untrusted, with planted-core.fsmonitor tests). Still open, and the reason this issue stays open: the eight --worktree git-hook entries that hooks start as a separate process (actionlint, bash-format, go-format, javascript-format, markdown-format, powershell-format, python-format, spelling) never load hook-utils.sh, so their git calls run without the overrides. Decided by the hub session (the owner can reverse it): the hook passes the overrides to that child through git's GIT_CONFIG_COUNT / GIT_CONFIG_KEY_n / GIT_CONFIG_VALUE_n environment variables, built by the one shared helper; Basis: judgment, on the build session's report; it keeps one definition and changes no call site in check-lib.sh. Left as is: worktree-create.sh does not pass core.hooksPath=/dev/null to git worktree add, because running the repository's post-checkout hook there is what running git in a repository the person chose does; it would matter only for a repository whose .git/config someone else wrote. Content filters (filter.<driver>.clean) cannot be turned off with -c, as #17082 recorded.
area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.needs-triageNot yet classified. Floor until a type and one priority tier are set.
Activity
github-actions commentedon Nov 17, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the shared
hooks/hook-utils.shhelper and its copies across plugins, plusplugins/guardrails/hooks/secret-pattern-detection.sh; run by every user whose hooks callgit check-ignore.Reversible: yes; revert the change to the git call wrappers and the synced copies.
Open questions: none
I understood this as follows: hook
git check-ignorecalls run without-c core.fsmonitor=false, so a repository whose.git/configwas written by someone else (for example an extracted archive) could start a command named in itscore.fsmonitorsetting. You want every such hook git call to go through one shared helper that passes the overrides from PR #16954, a test with a plantedcore.fsmonitorshowing nothing runs, and the shared copies synced. The attack needs a repository the user owns, becausesafe.directorystill applies, so I triaged it as a medium-severity hardening bug rather than a critical exposure. I found no open duplicate and no merged fix. The call sites you list should be re-verified with file:line when the work starts.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 17, 2026
Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).test(hook-utils): plant the fsmonitor hook in its Windows path form
kyle-sexton commentedon Nov 18, 2026
Status, 2026-11-18 (control-hub session, melodic-software/control-hub#11). Merged against this issue: #17104, #17082 and #17260 (the format adapters,
markdown-gates.shand the reap helper now go throughhook::git_untrusted, with planted-core.fsmonitortests). Still open, and the reason this issue stays open: the eight--worktreegit-hook entries that hooks start as a separate process (actionlint, bash-format, go-format, javascript-format, markdown-format, powershell-format, python-format, spelling) never loadhook-utils.sh, so their git calls run without the overrides. Decided by the hub session (the owner can reverse it): the hook passes the overrides to that child through git'sGIT_CONFIG_COUNT/GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_nenvironment variables, built by the one shared helper; Basis: judgment, on the build session's report; it keeps one definition and changes no call site incheck-lib.sh. Left as is:worktree-create.shdoes not passcore.hooksPath=/dev/nulltogit worktree add, because running the repository's post-checkout hook there is what running git in a repository the person chose does; it would matter only for a repository whose.git/configsomeone else wrote. Content filters (filter.<driver>.clean) cannot be turned off with-c, as #17082 recorded.fix(hooks): drop the shellcheck suppressions this branch added
fix(actionlint): keep blocking the turn end when the git overrides ca…