This is what MISRA C and AUTOSAR C++ is for. However I think those only apply to automotive components like the ECU, not the infotainment systems.
Hmm. Would it be a read only API or can infotainment ever effect change to the vehicle’s operations? My Forester’s vehicle settings (eg. modifying the autonomy features) are managed by the crappy screen behind the wheel rather than the nice touch screen.