Skip to content

Commit e266f2e

Browse files
Byronjpabeem
andcommitted
fix(repo): protect against --reference and --reference-if-able when cloning
It might be surprising if this is passed through unchecked kwargs. Related to https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-j8pf-7m8v-xx38 Co-authored-by: Jeroen <jpab.eemsterboer@gmail.com>
1 parent 213c81f commit e266f2e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎doc/source/changes.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Security fixes
1818

1919
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-f8wj-prgh-h9j7
2020
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-j3hg-fv33-37rw
21+
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-j8pf-7m8v-xx38
2122

2223
Git executable and safety
2324
-------------------------

‎git/repo/base.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ class Repo:
166166
"--separate-git-dir",
167167
# Fetches from an additional caller-controlled URI:
168168
"--bundle-uri",
169+
# Reads objects from a caller-controlled local repository:
170+
"--reference",
171+
"--reference-if-able",
169172
]
170173
"""Options to :manpage:`git-clone(1)` that permit unsafe command execution or I/O.
171174

0 commit comments

Comments
 (0)