Skip to content

docs(security): clarify command wrapper responsibilities - #2342

Merged
Byron merged 1 commit into
mainfrom
fix-threatmodel
Nov 10, 2026
Merged

Byron merged 1 commit into
mainfrom
fix-threatmodel

Conversation

@Byron

@Byron Byron commented Nov 10, 2026

Copy link
Copy Markdown
Member

No description provided.

<!-- agent -->
The threat model did not distinguish direct Git command access from
higher-level library operations. This left file reads explicitly requested
through raw command options liable to be mistaken for unwanted side effects
of a higher-level method.

Document `git.cmd.Git` and `repo.git` as command wrappers that do what the
caller requests, including the effects of supplied options. Use
`pathspec_from_file` to illustrate how a requested file read can also appear
in Git's diagnostics. Explain the application's responsibility for exposing
raw commands and errors to untrusted callers.

Distinguish these calls from the protections in `Head.checkout()` and
`Repo.clone_from()`, and preserve the reportability of protection bypasses.

Assisted-by: GPT 6.1 Sol
Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 07:13
@Byron
Byron merged commit 23f33ef into main Nov 10, 2026
68 checks passed
@Byron
Byron deleted the fix-threatmodel branch November 10, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for this documentation-only clarification of GitPython’s command-wrapper security responsibilities.

No open issues 🎉

What changed in this PR

This documentation-only PR clarifies the security responsibilities of callers using GitPython’s command wrapper versus higher-level APIs.

Changes:

  • Explains that git.cmd.Git and repo.git execute caller-supplied commands and options, including their intended effects.
  • Defines application responsibilities when exposing the wrapper to untrusted callers.
  • Distinguishes higher-level protections from direct wrapper behavior and confirms that protection bypasses remain reportable.
File Description
SECURITY.md Clarifies command-wrapper trust boundaries, caller responsibilities, and higher-level protections.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants