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

オープン
#2,200 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, rust
領域
build-system, cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
9
フォーク
2
平均マージ
1日 8時間
マージ済み PR(30日)
309

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SocketDev/socket-patch のほかの issue

SocketDev/socket-patch の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。