Re: How about using proper change control ?
This is nearly untenable.
"1. Small sql lite database with MD5 hashes of repos.": If you do that for long enough, that's not going to be a small file. Creating the hash requires a foolproof method of hashing everything. Updating it is not a fast operation.
"2. Hash database can only be updated by signed gnupg key": And who is going to have said key? Because if you want your database updated regularly and you require a human to do it each time to properly sign with a securely-held key, you're going to get a burned-out human who clicks OK on every update that comes out.
"3. Develop algorithm of trust rated on 1 to 5. 5 is fully trusted. 1 is unknown and use at your own risk.": It's open source, everything's at your own risk. But let's leave that aside and look at how one gets trusted here:
"To achieve 5 library must have been used with no verified complaints for 12 months.": No verified complaints either means nobody uses it or nobody's tracking complaints. If you mean only security vulnerability reports, not complaints about bugs or performance, then you could go for some time without detecting those vulns. A lot of people don't check every task, so someone could be using it and not reporting the vulnerabilities which do exist.
"Other factors taken into consideration could be: from a verified developer,": Verified by whom, how? Confirmation that the developer is the one pushing out the updated code how?
"library has been voted as useful by select community members,": Useful does not mean secure. Lots of things that are useful also have long CVE lists.
"trusted security researcher has audited source code and found no backdoors.": A useful one. Unfortunately also a very expensive one.
Inserting a note here. None of these conditions are going to help when dealing with updates to code, which is often how malware gets in if it has compromised the supply chain. If you update a library to fix a bug and it's an attacker who submitted it, having compromised the dev's system (see also exactly how Solar Winds happened), the dev is the same, the software is the same, and the source is the same. Unless you're planning to force a 12-month change freeze on all updates, in which case A) any detected vulnerability will be exploitable on your system for a year and B) nobody will be testing it because they're all doing that.
"4. Background debugger logging and tracing file r/w and socket calls to the terminal in a safe running mode.": Sure, go ahead. Few people will do that, but the tools are out there for you to do it if you want.
This addition would allow users of a library to see what a library is doing in the background.
"Libraries ran with a rating below 3 will error without using a --force-non-safe-librsry switch.": How? The calling process checks the library? The same calling process which requested the library? Or maybe it's in the compiler so someone can put that switch in the build script and send the binaries out?
"We can all see where this is going: running all code in containers without access to the operating system or other components, unless granted.": Yeah, that might be a better starting point. Insulation of different processes has proven the most effective method of limiting the damage done by a successful attack. It's also harder to do because you often need the software to interact with that kind of data, but it could be worse.