In the world of open-source software, there’s a balance between creating freely available tools and finding ways to sustain the hard work that goes into developing them. One recent solution that’s gaining traction is SponsorLink, introduced with the aim of promoting the sponsorship of open-source projects, specifically with the popular .NET testing library, Moq, in its 4.20 version.

What is SponsorLink?

In essence, SponsorLink was created by Daniel Cazzulino aka kzu the creator of Moq, is an initiative to encourage developers to financially support their fellow developers who produce valuable open-source tools. By embedding SponsorLink in a library, developers can send gentle reminders to their users about the possibility of sponsorship, straight within the development environment, like Visual Studio or Rider.

Link to SponsorLink blog post: SponsorLink: trying something new-ish for OSS sustainability (cazzulino.com)

How does it work? ***

The operation seems straightforward at first glance:

  1. If a developer is using an editor and there’s network connectivity, SponsorLink runs git config --get user.email during the build to retrieve the developer’s configured email.
  2. This email (hashed and encoded, not in its raw form) is then used to check if the developer has installed the SponsorLink GitHub app (this happens using an HTTP call to Azure).
  3. Further, it checks if the developer is sponsoring the particular open-source project.

If the developer isn’t sponsoring, they’re offered links to install the app and then sponsor the account.

*** Update by kzu on SponsorLink and the future of Moq:
SponsorLink: feedback and moving forward (cazzulino.com)

The Potential Issue

While the intent behind SponsorLink is noble – supporting the hard-working developers behind essential open-source projects – there’s a potential privacy concern. Even though the actual email isn’t sent directly (it’s hashed and encoded), there’s an inherent access to a developer’s local git configuration. For some, this might be a cause for concern. Lastly, we need to keep in mind the GDPR in Europe which this library might not be compliant.

Why should you care?

Moq is a highly popular .NET library used for testing. With its vast reach in the .NET community, many developers will be interacting with SponsorLink, possibly without being fully aware of it. Raising awareness about SponsorLink is not to demonize it or its creators but to ensure that developers are making informed decisions.

Final Thoughts

Open-source sustainability is a complex issue and there’s no one-size-fits-all answer. SponsorLink represents a genuine effort to tackle this problem, but as with any new tool or initiative, it’s essential to approach it with a keen awareness. As developers, we should be proactive in understanding the tools we use, the permissions they require, and the implications of those permissions. In the ever-evolving world of tech, informed decision-making remains our most valuable asset.

Daniel Cazzulino’s perspective offers a valuable look into the real challenges faced by open-source developers. While the path to sustainability is rocky, the emphasis on fostering connections between developers and sponsors may yet pave the way forward. The debate around OSS sustainability is far from over, but dialogues like this push the community closer to finding a middle ground.

***Update***
SponsorLink is now open source devlooped/SponsorLink: Public samples, issues and discussions repo for SponsorLink (github.com)
kzu has said that he will change the way he checks if you are a sponsor and won’t use your email.

***Update 2***
SponsorLink: feedback and moving forward (cazzulino.com)

Moq library pull request that implemented SponsorLink:
Add 💜 SponsorLink support by kzu · Pull Request #1363 · moq/moq (github.com)

You can find an intro to Moq here: Introduction to Moq – Coding Bolt
You can also check out my post that introduces you to NSubstitute

7 responses to “A Deep Dive into SponsorLink: Implications for Open-Source and Privacy (UPDATED)”

  1. This is not aligning with GDPR

    Liked by 1 person

    1. It does not unfortunately and even though as we speak the creator has removed SponsorLink, we are all still waiting to see what will happen.
      *I updated the article also.

      Like

  2. GDPR aside, of bigger issue for me is the fact these libraries are essentially able to advertise themselves inside of my development environment!

    SponsorLink creates warnings inside of your VS output console informing you that you do not have a SponsorLink account to ‘donate’ for these OSS libraries. I’m sorry, but this is NOT what the VS console is for!

    It disgusts me that a fellow developer believes that it is OK to force other developers to navigate through what can only be classified as SPAM advertising in such an important window of the IDE, this windows is there for code violations and exception information, not for advertisements!

    This needs to be stopped now and go no further.

    Like

  3. “git config –get user.email during the build to retrieve the developer’s configured email”
    Nobody is using their personal Email in git config … everyone who works in corporations uses user@corporation .com

    Like

    1. Very true. That actually makes the proposition worse though. Every bit of data (anything that is not software) on my work machine is the sole property of my company.

      This takes the problem of harvesting emails from random individual people and goes right into the realm where corporations will defend those bits at all cost, regardless of the actual value of the data.

      IT due diligence already considers the threat of OSS. OSS that is actively harvesting data from a developer’s machine harms all OSS, regardless of the purpose or what data is taken.

      I cannot see OSS packages that behave in this manner, and are introduced suddenly and without warning, passing any IT due diligence or security auditing. Rolling back the change and promising its return in the future does not put the milk back in the cow.

      Like

  4. While it’s noble to create and maintain open source libraries for free, it is ultimately not free for the maintainer. They end up spending time on the project that could otherwise be used for profitable work, pleasure and family. A lot of use look down on developers trying to profit from their work as if they have some moral obligation to provide free software. SponsorLink is a rather gentle attempt from a maintainer to profit from their work. It’s ridiculous people are upset at this. We aren’t living in a communist utopia and none of us are owed Moq for free. We are living in a capitalist world and the moment an open source, free library becomes widely adopted and used for profit the maintainer should adopt a profitable licencing model. As a community – primarily full of people making corporate wages using other people’s work – we should start paying licenses.

    Like

  5. They’re free to make it closed source / require a paid licence with X users or after earning Y amount if they want – That’s their choice.

    Sure, a free open-source competitor will instantly pop up if that happens since some people code things to help people because they want it to help people and have a job so it doesn’t need to be profitable…

    … But they’re free to do so if they want.

    Like

Leave a comment

Trending