When I hear “safety” in the context of software development, I’m always reminded that I need to automate my backup solution. The potential harm most software developers have to deal with is luckily only data loss due to hardware failures.
Safety is resilience against accidental harm to people, property, or the environment.
Aspects of safety in software development and operations include:
- Availability: A single server could be cut off from the internet by construction workers, a hard drive could reach its end of life, a fire could break out, an earthquake could hit the region.
- Scalability: Web services might go down when they are too successful. It’s sometimes called the “hug of death” when a huge website links to a small one. Or just when you have a successful marketing campaign.
- Integrity: All ways to send data are prone to errors. Packet loss or bit flips happen. We have error-correcting protocols to deal with that.
Software can also be safety-critical, for example when you think about airbags. A defect there can put lives at risk (example). Other examples of safety-critical software include traffic lights, life-support systems, software managing the electrical power grid, industrial software which is used in machines that produce medicine, pacemakers, and many more.
When we are talking about security in software development, we are thinking about hackers. Wikipedia has a pretty nice explanation:
Security is resilience against harm caused by others.
Aspects of security in software development and operations include:
- Accountability: You want to have a log of changes. This includes source code. In the version control system git, you can even cryptographically sign the changes so that others cannot tamper with your changes.
- Availability: An attacker might run a Denial-of-Service attack (DoS).
- Confidentiality: Man-in-the-middle (MITM) attacks that apply packet sniffing come to my mind. Dharmil Chhadva wrote a nice article about this topic.
- Integrity: Think of a bank account. An attacker wants to increase the money in one account. Cryptojacking is an example where not the data but the software is affected.
Measures to increase security include:
- Code Reviews and Unit Tests: Anything that improves overall code quality
- Software Composition Analysis (SCA), e.g. by safety, Veracode, WhiteSource, Black Duck, and many more.
- Static Application Security Testing (SAST), e.g. by bandit, Coverity, and many more.
- Dynamic Application Security Testing (DAST), e.g. supported by OWASP ZAP, Arachni Scanner, Synopsys, and many more.
TL;DR: Differences between Safety and Security
| Safety | Security | |
|---|---|---|
| What to fear | Hazard | Threat |
| Cause is | Accidental | Malicious |
| Measures are | Backups, Redundancy | SAST, DAST, SCA, HTTPS, ... |
| When things go wrong, it's called a ... | Failure | Incident |
| Roles | Site Reliability Engineer | AppSec Engineer, Penetration Tester |
See also
- IEC 61508: “Functional Safety of […] Programmable Electronic Safety-related Systems”.
- IEEE Std 1228: “Standard for Software Safety Plans”.
- OmniSecu: Types of Network Attacks against Confidentiality, Integrity and Availability