Python coding standard for Safety Critical Applications - Stack Overflow
Looking for an official documentation regarding security best practices and how to write secure code
What's the best Python certification you're ever done and why?
Any thoughts about SEI CERT C?
What is secure coding and why is it important?
What are some best practices for incorporating secure coding into a development process?
How can developers ensure their code meets security standards?
Videos
Top layer safety standards for "functional safety" like IEC 61508 (industrial), ISO 26262 (automotive) or DO-178 (aerospace) etc come with a software part (for example IEC 61508-3), where they list a number of suitable programming languages. These are exclusively old languages proven in use for a long time, where all flaws and poorly-defined behavior is regarded as well-known and execution can be regarded as predictable.
In practice, for the highest safety levels it means that you are pretty much restricted to C with safe subset (MISRA C) or Ada with safe subset (SPARK). A bunch of other old languages like Modula-2, Pascal and Fortran are also mentioned, but the tool support for these in the context of modern safety MCUs is non-existent. As is support for Python for such MCUs.
Languages like Python and C++ are not even mentioned for the lowest safety levels, so between the lines they are dismissed as entirely unsuitable. Even less so than pure assembler, which is actually mentioned as something that may used for the lower safety levels.
From my experience in the railway and automotive industries, there is no closed list of programming languages. The thing is that the programming language must have specific properties and the tool used for development must be qualified.
As an example I can refer to railway EN-50716. Table A.15 "Suitable Programming Languages" only lists the recommended and highly recommended programming language properties (such as "supports commenting", "supports testing", or "supports static analysis"). The table is supplemented by Section D.54 of Appendix D, which covers these topics in more detail, but there is still no closed list of possible programming languages. This simply means that the list is open and future-proof - if any language meets the specific criteria, then it can be used.
I believe this is also true for automotive ISO-26262 (as far as I can remember), but I have no experience in other sectors.
This has serious practical consequences - since the list is open, you are not limited to "old", well-known languages like C, C++ or Ada, but for some time now there is also the possibility to use Rust in a safety-critical application - qualified rust. In the end, you have to provide an evidence to the assessor that your choice makes sense (in the context of the used standard).
I am looking for resources on how to write secure code with Python, I have been in python.org but there is only a Security reporting section. Before considering Google top results I would like to check if there is an official documentation
