There are already generic diagnostic interfaces (OBD-II, SAE J1979) mandated by law which all automakers must support. However, they are also allowed to keep proprietary DTCs and diagnostic routines, which may require proprietary tools or information use. This hinders independent repairers from doing many procedures, for example, reprogramming a vehicle with modern encrypted anti-theft keys to accept a new key.
I do not think that automakers should be required to divulge proprietary information which could be used by competitors to reverse engineer some of their technology, or by thieves or amateur modders to easily hack into cars. However, independent mechanics should be be able to do most repairs on a vehicle, at least as far as being able to accurately diagnose a problem by pulling information from the on-board diagnostics.
Perhaps the right way to go is to enlarge the industry standards for diagnostics, so that more specific failure codes are publicly known. That way, generic tools would have access to more details. Sensitive functions, like re-flashing modules, should remain proprietary, to prevent easy tampering with the software or disabling of important functions.