| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
<!-- agent --> GitConfigParser decoded valid multiline values into embedded newlines, but _write() serialized those newlines as indented physical lines. Rewriting an otherwise unchanged config could therefore change its meaning to Git. Serialize resident multiline values with Git-compatible escapes inside a quoted continuation, preserving GitPython read compatibility while keeping each option structurally intact. This addresses GHSA-284h-m62q-gf8w. The regression starts with an inert multiline value, performs an unrelated write, and verifies with both GitPython and git config that it remains one value and does not create another option. Git baseline: config.c parse_value() and write_pair() at cf5497b14c5a escape embedded LF as \\n rather than emitting it as a physical config line. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
<!-- agent --> Submodule configuration is read from .gitmodules, whose contents may come from an untrusted repository. Its parser inherited merge_includes=True and could therefore open files named by include directives during ordinary submodule enumeration. Disable include merging at the SubmoduleConfigParser construction site. This matches Repo.config_writer() hardening from 41ecc6a and addresses GHSA-7833-fr7j-v32q without changing include behavior for trusted config parsers. The regression points .gitmodules at a non-config file and verifies the submodule entry remains readable without opening the included path. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: ef7568e3b3
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was a problem hiding this comment.
Hardens Git config parsing/serialization to prevent unsafe boundary crossings when rewriting config files and when parsing repository-controlled .gitmodules, aligning GitPython behavior more closely with Git’s escaping and include-handling expectations.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| git/config.py | Adjusts config serialization to quote/escape special characters to preserve multiline values safely. |
| git/objects/submodule/base.py | Forces .gitmodules parsing to use merge_includes=False to avoid opening arbitrary local files. |
| test/test_config.py | Adds tests to ensure multiline rewrite doesn’t create unintended options and that special chars round-trip and match git config. |
| test/test_submodule.py | Adds a test ensuring .gitmodules does not merge includes (and thus doesn’t parse unrelated files). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by Codex GPT-5.
Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Summary
Advisories
Both advisories remain private/under triage, so reproduction and exploit details are intentionally omitted here.
Advisory summary
GHSA-284h-m62q-gf8w
GHSA-7833-fr7j-v32q
Baselines
Validation