🔐 Safe software development
Six topics on how to develop secure software - from Secure by Design principles to CI/CD security gates and supply chain integrity - by international practice (CISA, NIST SSDF, OWASP, SLSA). Examples are general, intended for training.
Safety as design requirement
Secure by Design and Secure by Default
Secure by Design means security as a requirement from day one; Secure by Default means secure defaults (e.g. MFA enabled, ports closed) so that the user does not have to activate anything manually.
In practice
Safety is a business requirement, not an additional function. Key principles: minimum attack surface, minimum privileges, multilayer protection, safe secure failure (fail safely) and safe defaults.
Reference
Principles of safety design for CISA "Secure by Design" (2023), NIST SSDF (SP 800-218), OWASP, Saltzer & Schroeder (1975).
Safety Note
The responsibility for safety belongs to the manufacturer and not to the user. The safety to be manually activated in practice remains excluded - therefore the default must be safe.
Safe Development Life Cycle (SDLC)
Safety performance in each phase
In practice
For each phase your security action and responsible. Map on recognised frameworks - Microsoft SDL, NIST SSDF practices (PO, PS, PW, RV) and OWASP SAMM mature domains.
Reference
NIST SSDF SP 800-218, Microsoft Security Development Lifecycle, OWASP SAMM, BSIMM, ISO/IEC 27034 (application security).
Safety Note
Danger modelling during the design phase finds architectural flaws that no code scanner sees - they are most expensive to repair later.
Safe coding practices
The most common risks (OWASP Top 10) and protection
In practice
Practical checklist for the developer and code review. OWASP USS gives verifiable requirements at three levels (L1-L3) depending on the application's decline.
Reference
OWASP Top 10:2021, OWASP Application Security Verification Standard (USAS) 5.0 (2025), OWASP Cheat Sheet Series, CWE Top 25, SEI CERT Coding Standards.
Safety Note
Never trust the input and write your own cryptography. Valide input to server (not only browser) and uses proven libraries.
DevSecOps - Safety on conveyor
Automated safety gates at each stage
Change in conveyor step by step
Where automatic gates can stop the change. Green note shows when the gate stops it.
One change in production
- 1DeveloperBefore commit: mystery scanning locally
The key that goes into git history must be changed - deletion from history does not help.
- 2Developer → CIpull request
Gates are stopped if: a secret found in the code or a critical error found in SAST
Conveyer starts automatic checks. If the gate falls, no change is made.
- 3CISAST code, SCA dependence, second person reviews
Tools find certain samples, man - logic errors that the tools do not see.
- 4CIBuilds image → scans → SBOM → signs
SBOM is a list of ingredients. The signature proves that the image comes directly from this conveyor.
- 5CI → Environmentsigned image + SBOM
The gate is stopped if: signature does not match or the image has critical vulnerability
The environment only accepts signed images - a hand-made image is not launched.
- 6EnvironmentDAST in test environment: Checks the work app from the outside
Finds what is only seen in operation: configuration, headers, authentication.
- 7EnvironmentRelease into production with possibility to return to previous version
If something goes wrong, return is one step, no new building.
- 8NoteThe conveyor itself is aimed at: minimal rights, secrets outside the code, verified third party activities
That takes over the conveyor, it can deliver its code to all users.
In practice
Each security tool becomes an automatic conveyor gate. Its security is scaled up by design rather than relying on manual testing under time pressure.
Reference
OWASP Top 10 CI/CD Security Risks, NIST SSDF SP 800-218, SLSA, DevSecOps (culture + automation).
Safety Note
The conveyor itself is the goal - to protect the secrets of the construction, to limit the authorisation and verification of the work of the conveyor (GitHub Actions etc.) so that the conveyor cannot compromise.
Automated safety testing
SAST, SCA, DAST, IAST - who finds anything
In practice
Combine methods according to conveyor section: static (SAST/SCA/secret) early, dynamic (DAST/IAST) tests, infrastructure scanning before deployment.
Reference
OWASP (test tools - ZAP, Dependency-Check), NIST SSDF SP 800-218, CIS Benchmarks, OSS-Fuzz (continuous fuzzing).
Safety Note
Tools find known templates, not business logic errors. Automated testing does not check whether access control is logically correct - it is found by a manual review and intrusion test.
Software supply chain integrity
SBOM, signature and SLSA levels
In practice
SBOM allows a quick answer "do we are affected by this CVE?"; origin (provenance) and signature proves that the artefact (the final file of the building) comes from a reliable, genuine construction process. Together they protect the supply chain.
Reference
SLSA v1.0, NIST SSDF SP 800-218, SPDX/CycloneDX (SBOM formats), Sigstore/cosign, in-tototo, US EO 14028, EU Cyber Resilience Act (Regulation (EU) 2024/2847): reporting on active use of injuries from 11 September 2026, full requirements from 11 December 2027.
Safety Note
Most code is third party addiction. SolarWinds and similar incidents show - compromised construction or addiction to circumvent all other protections. Verify before launch.
Abbreviations
All abbreviations used in the guide (original and meaning).
- SDLC
- Software Development Life Cycle - software development life cycle.
- SSDLC
- Safe SDLC - life cycle with built-in safety.
- SDL
- Security Development Lifecycle - Microsoft secure development process.
- SSDF
- Secure Software Development Framework - NIST SP 800-218.
- SAMM
- Software Assurance Integrity Model - OWASP maturity model.
- BSIMM
- Building Security In Matrity Model - real practice measurement.
- SAST
- Static Application Security Testing - Statistical Source Analysis.
- DAST
- Dynamic Application Security Testing - Test of the running application.
- IAST
- Interactive Application Security Testing - instrumented performance test.
- SCA
- Software Composition Analysis - addiction/component analysis.
- RASP
- Runtime Application Self-Protection - self-defence of execution time.
- WAF
- Web Application Firewall for web applications.
- DevSecOps
- Security is embedded in DevOps culture and automation.
- CI/CD
- Continuous integration/delivery (conveyor).
- IaC
- Infrastructure as Code - infrastructure as code.
- SBOM
- Software Bill of Materials - a list of software components.
- SLSA
- Supply-chain Levels for Software Artifacts - supply chain levels.
- CWE
- Common Weakness Enumeration - software weakness classification.
- CVE
- Common Vulnerabilities and Exposures - a public vulnerability register.
- ASVS
- OWASP Application Security Verification Standard.
- STRIDE
- Threatened Modeling Categories (Microsoft).
- MFA
- Multi-Factor Authentication - Multifactor Authentication.
- TLS
- Transport Layer Security - transport layer encryption.
- CRA
- EU Cyber Resilience Act - EU cyber resilience regulation.
- provenance
- Origin note - how and from which the artefact was built (SLSA).
- artefakts
- Final result of the construction - executable, package or container image.
- build
- Construction - conversion of source to a launchable artefact.