JGit repository-controlled child authority receives caller credentials
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 62/100
Rechercherichtung
Start with report.md and attachments/evidence.log in the attached files, then trace where JGit creates child submodule transports (recursive clone, FetchCommand's fetchRecurseSubmodules path-vs-name logic, and the FETCH_HEAD walk) and how the outer CredentialsProvider is passed down. Read the existing URI-scoped credentials provider tests to see the expected boundary. Done looks like re-running ./attachments/reproduce.sh reproduce-output with the pinned JGit/Git 2.55.0 shows vulnerable_child_authorization=absent and credentialed child requests of 0 for all three cases.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Version
JGit 7.9.0-SNAPSHOT (source revision 87ec2100083ffc894bedd1e3f0d76b7f10e45ed6)
Operating System
Linux/Unix
Bug description
I reproduced this on JGit source revision 87ec2100083ffc894bedd1e3f0d76b7f10e45ed6. JGit passes the outer CredentialsProvider into child submodule transports selected by repository metadata. In my testing environment, the same boundary is reached by:
- recursive clone;
FetchCommandusing the submodule path instead of its configured name forfetchRecurseSubmodules; and- a later fetch walking stale
FETCH_HEAD.
To reproduce, set JGIT_DIR, JGIT_MAIN_JAR, and GIT_CORE_BIN to the pinned source/builds, then run ./attachments/reproduce.sh reproduce-output after extracting attachments.zip. GIT_CORE_BIN must report Git core 2.55.0.
Actual behavior
The child HTTP endpoint receives the caller's Basic credential after its 401 challenge. A URI-scoped provider records no authenticated child request. The Git core 2.55.0 controls record no credentialed child request. The per-case counts are in the attached log.
Expected behavior
A child transport selected by repository metadata should not inherit credentials for another authority. The child fetch policy should use the configured submodule name, and a no-op parent fetch should not activate a child from stale FETCH_HEAD.
Relevant log output
The redacted results are in `attachments/evidence.log`:
jgit_version=7.9.0-SNAPSHOT
jgit_source_revision=87ec2100083ffc894bedd1e3f0d76b7f10e45ed6
git_core_version=git version 2.55.0
case=recursive-clone
vulnerable_child_authorization=present
scoped_child_authorization=absent
native_child_authorization=absent
case=fetch-policy-name-path
jgit_child_requests=3
jgit_credentialed_child_requests=2
native_child_requests=0
case=stale-fetch-head
jgit_child_requests=3
jgit_credentialed_child_requests=2
native_first_child_requests=0
native_second_child_requests=0
Other information
report.md contains the source analysis and GitHub source links. attachments.zip contains the three minimal replay cases and redacted request evidence.
The report and reproduction were assisted by an LLM. I reviewed the source and confirmed the behavior by running the reproduction. Sorry if this adds review work; the attached details are intended to help locate and fix the issue.
Attachments
- Vorherrschende Sprache
- Java
- Sterne
- 427
- Forks
- 116
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus eclipse-jgit/jgit
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
eclipse-jgit/jgit#329 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Evtl. wieder frei @hardikyadav12 hat das vor 77 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
eclipse-jgit/jgit#297 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
eclipse-jgit/jgit#293 · 2 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
eclipse-jgit/jgit#288 ·
Alle Issues in eclipse-jgit/jgit
Ähnliche Issues
-
? - Needs Triage bot_watch bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NVIDIA/cudf-spark-jni#5594 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Upgrade solr to 9.11.0Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DataONEorg/dataone-indexer#390 ·