A weak provision may be that at least a minimum of development and testing has to take place, with requirements on record-keeping and naming of responsible persons: For a simple device, or a simple software, this might take the form of a checklist or a questionnaire which you have to take before uploading code to the App-Store.
Yes, this seems very straightforward to fake, but at least then you have deliberately cheated a system designed to catch errors, and not "just written shitty code" (or built a flimsy mechanical device... when applying this scheme to non-software world). Which, I think, would already help a lot to make people accountable for their products/inventions/...
{for, example: with CE certifications, you, as a producer only state that you have built your products according to some harmonized standards, but the conformance itself is not tested by a third party}
With increasing security/privacy requirements, the mandated measures can could then be ramped up. Maybe scaled by permissions of an application (accesses otherwise protected data?), the ability to process sensitive date or maybe number of users?
The extremes measure would be a full line-by-line review on every change, when software is life-sustaining or a fault may have catastrophic (death of people, like running a pacemaker or steering a huge plane).
There's some testing you can do, and you can sort of guess which product categories fit you exactly and apply those, but if your product is really innovative this is vague. You end up just putting a declaration of conformity in the box and a sticker on the product and hoping for the best.
And this software is not 'that' critical (financial). I would actually agree that life or dead software should be checked line by line by experts, software and well described processes. I would even insist that critical software that can be formally verified should be formally verified. But for a broader range of software this is not possible and well, I don't think it should be needed for innocent software like, say, games.
What could work for non critical software is having to pay for bugs if software is faulty based on the severity of the bug. I would be very much against the kind of liability that involves again kind of indirect damages, so the maximum of damage is limited to what you paid. Most people do not want that but you would want to have some or all money back in case of neglect (bugs that do not properly get fixed) without forgoing your license. That will kill companies (if turned back the clock with this rule, MS + Oracle notably) but then again, they won't cut corners like what happens now.
If it's just code used in critical situation, then you're not really talking about the same thing as pjmlp.
> I support software being regulated just like everything else, not only on life critical situations.
Maybe there is a line that is "critical", but not "life critical", but ancestor's statement was pretty damn broad.