The only "third-party" packages that we want to ideally allow/support would be provided from LTS versions of our runtime (in this case, packages provided by the dotnet team and audited by microsoft). So we will always try to build around what the framework provides. Second choice is our own code, third choice is open-source packages, fouth choice is a separate application/appliance (lets say ZenDesk for ticketing). Over time, we will reduce this footprint to only have dotnet team code and our own.
Remember most CVE's can be hidden on servers that are not publicly routable and don't have a real exploitation paths. The bits that are public (lets say a linux edge server with a web server on it, some firewalls, a couple of open ports) - these should be hardened to the max and not allow full access to all the services running behind it. We don't even give our internal services public IP addresses to make near impossible to route traffic to them.
Our git repo's are also not on public infrastructure (serious, think carefully about hosting on public services and if you really need it), never mind making the repo public.
We also have a dedicated secrets/certs manager, so no credentials are in codebases or pipelines. Very strict in this regard.
also some 3rd party libraries are overdesigned/overcomplicated because everybody wants the library to do everything for everybody.
This overcomplication can easily introduce security problems that is not present in the 1K solution.
Also a source of significant dependency churn even excluding security bugs.
Whereas with my own code I don't have to worry about scheduling work that's only arisen because somebody outside my organisation has decided to make a breaking change in a dependency. Paying that tax got old over a decade ago, and my patience with it now is close to zero.
What a bullshit.
It's different scenario, different trade offs.
You mitigate risk of library being sold to malicious 3rd party, you avoid risk of your supply chain being hacked, you avoid API/behaviour breaks, etc.
The trade off is that you have to maintain it.
That's why dotnet's ecosystem is so loved due to MS providing 90% of needed libraries, so you avoid some 3rd parties maintained by single person.
Often it can be a very good choice to write the functionality yourself and not rely on external libraries.
And since we now have coding assistants, maintaining in-house costs near nothing now. Nobody else can break us, only ourselves.