Agent-mode NuGet apply leaves stale dll copies in bin/ and publish output unreported, and gives no advisory when a patched assembly is strong-named or Authenticode-signed

Aberta
#2,198 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp, rust

Direção de pesquisa

Start in crates/socket-patch-core/src/crawlers/nuget_crawler.rs at get_nuget_package_paths, which currently finds only the packages.config folder, the packageFolders in obj/project.assets.json, and the global packages folder. Then read patch/sidecars/nuget.rs to see how .nupkg.metadata and the .nupkg.sha512 warning are handled. Done means the apply step also reports stale dll copies under bin/ and publish output, and warns when a patched assembly is strong-named or Authenticode-signed. Those two behaviours need design decisions first, so check with maintainers before writing code.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

agent:triaged enhancement pm:nuget priority:p3

Summary

Agent mode patches a NuGet package where NuGet restored it: the packages.config folder, the packageFolders of obj/project.assets.json, and the global packages folder (crates/socket-patch-core/src/crawlers/nuget_crawler.rs, get_nuget_package_paths). The dlls a project actually runs are the COPIES in its build output (bin/<configuration>/<tfm>/) and in publish directories. Those are not found or reported, so after apply an already-built project still loads the unpatched dll until it is rebuilt.

There is also no advisory about signing: changing a strong-named assembly invalidates its strong-name signature, and an Authenticode signature if present. I found no mention of either in the crawler or in patch/sidecars/nuget.rs (which handles .nupkg.metadata and warns about .nupkg.sha512).

Why this matters

For .NET a patch always changes a compiled dll. A user who applies and then runs without rebuilding is still vulnerable, with no signal. Strong names are common: all 32 dlls in five releases of four widely used packages I inspected (Newtonsoft.Json, Serilog, Humanizer.Core, Polly) were strong-named.

Suggested direction

  1. After patching a NuGet package, look for copies of the patched dlls under the project's output directories and report them (an advisory such as "rebuild required: N stale copies"), and withhold a VEX attestation while stale copies exist, the way stale copies are treated for other ecosystems.
  2. An advisory when a patched assembly is strong-named or Authenticode-signed, saying the signature no longer verifies and on which runtimes that matters.
Linguagem predominante
Rust
Estrelas
9
Forks
2
Merge médio
1d 8h
PRs com merge (30d)
309

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de SocketDev/socket-patch

Todas as issues de SocketDev/socket-patch

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.