Hosted and vendored Maven cannot serve a patched classifier jar: the grant covers only the main jar

Aperta
#2,200 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, rust
Ambito
build-system, cli

Direzione di ricerca

Start with the refusal in crates/socket-patch-core/src/patch/redirect/mod.rs (redirect_maven_classifier_unsupported) and the classifier_unpatched_copy degrade in crates/socket-patch-core/src/vendor/jvm/gradle.rs, then check how agent mode already swaps classifier jar leaves. Done means hosted and vendored modes serve a patched jar for each declared classifier and still refuse when the service has none. The grant format belongs to the patch service, so confirm that contract before changing the Rust side.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent:triaged enhancement pm:maven priority:p3

Summary

A classifier variant of a patched Maven artifact cannot be delivered patched in hosted or vendored mode:

  • hosted refuses with redirect_maven_classifier_unsupported (crates/socket-patch-core/src/patch/redirect/mod.rs:9695): "the Socket patch covers only the main jar";
  • vendored copies the upstream classifier jar and degrades with classifier_unpatched_copy (crates/socket-patch-core/src/vendor/jvm/gradle.rs:502).

Agent mode does handle classifier jars (it swaps each jar leaf it finds).

Why this matters

Classifier jars are how Maven ships platform-specific and alternate builds of the same code (native bundles such as linux-x86_64, jdk8 vs jdk11 builds, shaded). When the fix is in code that the classifier jar also carries, the build keeps the vulnerable copy on its class path, which the tool correctly reports but cannot fix.

Suggested direction

Let the patch service's grant serve a patched jar per classifier (keyed by the classifier and ext qualifiers the manifest already uses for variants), and have hosted/vendored wire each classifier the build declares. Keep today's refusal when the service has no patched jar for a declared classifier.

Lingua principale
Rust
Stelle
9
Fork
2
Merge medio
1g 8h
PR unite (30g)
309

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SocketDev/socket-patch

Tutte le issue di SocketDev/socket-patch

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.