Reference should be made to the various implementations of EN 61508-3 Functional safety of electrical/electronic/programmable electronic safety-related systems – Part 3: Software requirements which specifically deals with software applications in programmable safety related systems.
European harmonised standard EN 50495 Safety devices required for the safe functioning of equipment with respect to explosion risks refers directly to EN 61508-3 for software consideration.
In the design of software-controlled equipment, protective systems and safety devices, special account must be taken of the risks arising from faults in the programme. And what if hacking might be a topic.
For the software related to installation it is said to be the same requirements.
Keep up good work!