diff options
| author | Mohamed Hegazy <8000722+mhegazy@users.noreply.github.com> | 2026-11-05 14:15:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-05 14:15:22 -0800 |
| commit | 88cc978a56e28d54180fda4e423bfddde1e7f532 (patch) | |
| tree | 9193248d0833fa94c103575e1f96adc28ac82e39 /plugins/security-guidance/hooks/gitutil.py | |
| parent | 848b86720e4871c0148b4c4113162cb6fe42a68e (diff) | |
| parent | 0610eb807de91eb829f4bf9354cfd4bcb45bdcc6 (diff) | |
Merge pull request #7002 from anthropics/mhegazy/sg-git-log-signature-off
security-guidance: read git log output without signature checks
Diffstat (limited to 'plugins/security-guidance/hooks/gitutil.py')
| -rw-r--r-- | plugins/security-guidance/hooks/gitutil.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/security-guidance/hooks/gitutil.py b/plugins/security-guidance/hooks/gitutil.py index 7ab40403..75d08298 100644 --- a/plugins/security-guidance/hooks/gitutil.py +++ b/plugins/security-guidance/hooks/gitutil.py @@ -93,6 +93,10 @@ GIT_CMD = [ # _drop_gitlinks for the commands that take no such setting. "-c", "diff.ignoreSubmodules=all", "-c", "diff.submodule=short", + # `git log` and `git show` print commit metadata for the hooks to parse. + # With log.showSignature set they would also verify each signed commit, + # adding lines to the output and starting the program gpg.program names. + "-c", "log.showSignature=false", ] # diff.ignoreSubmodules is a default that the repository's own settings for @@ -105,6 +109,7 @@ SAFE_GIT_CONFIG = ( ("core.hooksPath", "/dev/null"), ("diff.ignoreSubmodules", "all"), ("diff.submodule", "short"), + ("log.showSignature", "false"), ) # The hook's git runs in the background beside the session's own git. Without |
