Wpis z mikrobloga

Autor popularnej biblioteki do mockowania - moq, postanowił wyciągać emaile użytkowników z ich lokalnego repo gitowego podczas budowania apki i wysyłać je na zewnętrzne serwery żeby sprawdzić czy dev sponsoruje moqa.

It seems that starting from version 4.20, SponsorLink is included. This is a closed-source project, provided as a dll with obfuscated code, which seems to at least scan local data (git config?) and sends the hashed email of the current developer to a cloud service. The scanning is provided as a .NET analyzer tool, which runs during the build. There is no option to disable this.


https://github.com/moq/moq/issues/1372

https://www.reddit.com/r/dotnet/comments/15ljdcc/does_moq_in_its_latest_version_extract_and_send/


private static string \u00a0(string P_0)
{
try
{
Process process = Process.Start(new ProcessStartInfo(
6FA47342-3716-4274-AF01-7A37793E0E97.\u206f(), // this is obfuscated value of "git"
6FA47342-3716-4274-AF01-7A37793E0E97.\u3000() // this is obfuscated value of "config --get user.email"
)
{
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = P_0
});
process.WaitForExit();
if (process.ExitCode != 0)
{
return null;
}
return process.StandardOutput.ReadToEnd().Trim();
}
catch
{
}
return null;
}

#dotnet #programowanie #csharp #testyjednostkowe
  • 5
  • Odpowiedz
@Balikator: U nas też na slacku wiadomości żeby tylko przy aktualizacji paczek jakichkolwiek w repo, nie aktualizowac Moq ;) Cóż, ja mam #!$%@?, nie piszę testów :P
  • Odpowiedz
@xavhowk: żadna poważna firma nie zaakceptuje już używania tej biblioteki. Gościu zapewnił pracę przez najbliższe pół roku wielu tysiącom ludzi, którzy będą teraz to usuwać z projektów :D
  • Odpowiedz