Key takeaways
- Use a framework, not a checklist. NIST's Secure Software Development Framework (SSDF) version 1.1 defines 19 practices and 42 tasks in four groups.
- Design against the OWASP Top 10:2025. Broken access control still ranks first, and software supply chain failures rose to third.
- Test in the pipeline. Static analysis, dependency scanning and dynamic testing should run on every build, not once before release.
- Treat secrets as data, not text. API keys and passwords belong in a vault with rotation, never in source code.
- Plan the fix before the flaw. A vulnerability response plan with a named owner and a patch timeline matters as much as prevention.
What are secure software development practices?
Secure software development practices are the habits, checks and tools a team uses to keep security flaws out of its software. They cover the whole lifecycle: writing security requirements before coding starts, designing against known risks, reviewing code, testing the running application, and responding to vulnerabilities after release.
NIST's Secure Software Development Framework (SSDF), published as SP 800-218, is the most widely used structure for these practices. Version 1.1 groups 19 practices into four groups: Prepare the Organization, Protect the Software, Produce Well-Secured Software, and Respond to Vulnerabilities. The framework is voluntary and tool-neutral, so any team can map its own tools and processes to it.
The point is timing. Fixing a flaw in design costs far less than fixing it after release, when customers, data and reputation are already exposed. Teams that build security in from the start spend less time on emergency patches later.
Which risks should development teams design against?
Development teams should design against the OWASP Top 10:2025, the most widely used list of web application security risks. The 2025 edition is the first update since 2021, and it reshuffled the order based on real-world data from more than 2.8 million applications.
| Rank | Category | What it looks like in practice |
|---|---|---|
| A01 | Broken Access Control | A user views or changes another user's records by editing an ID in a request |
| A02 | Security Misconfiguration | Debug modes, default credentials or open storage left on in production |
| A03 | Software Supply Chain Failures | A vulnerable or compromised library or build component reaches production |
| A04 | Cryptographic Failures | Sensitive data stored or sent without proper encryption |
| A05 | Injection | User input is run as a database query or command |
| A06 | Insecure Design | A control that should have been designed in is missing entirely |
| A07 | Authentication Failures | Weak login flows, no rate limiting, no multi-factor option |
| A08 | Software or Data Integrity Failures | Unverified updates or untrusted data treated as trusted |
| A09 | Security Logging and Alerting Failures | A breach goes unnoticed because nothing was logged or nobody was alerted |
| A10 | Mishandling of Exceptional Conditions | Errors that fail open, leak internals or leave state inconsistent |
Three changes matter most. Server-side request forgery is now folded into broken access control, vulnerable components grew into the broader software supply chain category, and mishandling of exceptional conditions is a new category. Use the list as the minimum your design reviews and tests cover, not as a testing standard. OWASP itself calls it an awareness document.
How do you write secure code?
You write secure code by treating every piece of untrusted input as hostile and checking authority on the server for every request. The single most effective habit is using parameterized queries for all database access, so user input can never change the structure of a query.
Validate input against a strict allowlist: check type, length, format and range before the data reaches business logic. Then encode output for the context it lands in, whether that is HTML, JavaScript or a shell command. Validation and encoding are different jobs, and both are needed.
Enforce access control server-side on every request, with deny by default. Never rely on hiding a button or a URL, because anyone can call the endpoint directly. Add automated tests that try to access another user's data and admin functions; these tests catch the top-ranked OWASP risk better than any scanner.
Use maintained libraries for encryption and authentication, and never write your own cryptography. Use TLS 1.2 or higher for data in transit and AES-256 for data at rest, and store passwords with a modern hashing algorithm. If a library already solves the problem well, reuse it instead of writing your own version.
How do you secure the software supply chain?
You secure the software supply chain by knowing exactly what is inside your software and checking every component before it ships. Start with an inventory of all dependencies, including transitive ones, and generate a software bill of materials (SBOM) for each release.
Pin dependencies to specific versions and verify integrity with cryptographic signatures or checksums, so a compromised package cannot slip in silently. Scan dependencies for known vulnerabilities on every build, and fail the build on high-severity findings until someone reviews them.
The May 2026 TanStack compromise, in which 84 malicious package versions reached npm, showed that even widely used packages can be attacked.
Protect the build pipeline itself. Limit who can change build configuration, require signed commits for release branches, and sign release artifacts so customers can verify them. Audit CI/CD plugins and developer tooling with the same care as production code, because the build system is part of the attack surface.
How do you test software for security?
You test software for security with several different methods, because no single test finds every flaw. Static analysis (SAST) scans source code for injection, cryptography and access control issues, and it should run in the pipeline on every pull request.
Software composition analysis (SCA) scans the dependency tree for known vulnerabilities and license problems. Dynamic testing (DAST) probes the running application for configuration and runtime flaws that static analysis cannot see. Together, the three cover code, dependencies and the live system.
Add penetration testing for high-risk applications: a skilled tester checks the running system the way an attacker would, including business logic that automated tools miss. Schedule it before major releases and after significant changes, and treat the findings as input to the next design review, not as a one-off report.
How should teams handle secrets and credentials?
Teams should store secrets in a dedicated vault or managed secrets service, never in source code, configuration files or chat messages. API keys, database passwords and signing keys are data that needs access control, rotation and audit logging, just like customer records.
Rotate secrets on a schedule and immediately after any suspected exposure. Give each service its own credential with the least privilege it needs, so one leaked key cannot open every system. Use short-lived tokens where possible, and prefer managed identity services over long-lived passwords.
Scan repositories for committed secrets on every push, and treat a found secret as compromised until it is rotated. The scan is a safety net, not the plan: the plan is that secrets never enter version control in the first place. For a broader look at keeping code and credentials safe, see our guide to software security practices.
How do you respond when a vulnerability is found?
You respond to a vulnerability by confirming it, fixing it, and learning from it, in that order. First, reproduce the report and assess the impact: which versions are affected, what data is at risk, and whether the flaw is being exploited.
Publish a fix on a clear timeline, and tell affected users what to do. NIST's SSDF groups this work under Respond to Vulnerabilities, which covers identifying vulnerabilities, remediating them, and analyzing root causes so the same class of flaw does not return.
A public vulnerability disclosure policy, with a security contact address, makes it easier for researchers to report problems privately.
After the fix, run a root-cause review. Ask which practice failed: was the design reviewed, was the code tested, was the dependency scanned? Feed the answer back into the checklist for the next release. Teams that skip this step fix the same bug twice.
Step 1: Write down security requirements
List the sensitive data the software handles, the laws that apply, and the minimum controls each feature needs. Put this in the same place as the product requirements, so security is part of the plan and not an afterthought.
Step 2: Threat model every new feature
Before writing code, ask what could go wrong: who attacks this feature, what do they gain, and what stops them? A short session with the team is enough for most features. Larger features that handle payments or personal data deserve a formal model.
Step 3: Add security checks to the pipeline
Wire static analysis, dependency scanning and secret scanning into continuous integration, and fail builds on high-severity findings. Automate configuration checks so production settings are verified, not assumed.
Step 4: Test the running application
Run dynamic tests and, for high-risk systems, penetration tests before release. Test access control with real user accounts, and confirm that error messages return generic text instead of stack traces.
Step 5: Ship, monitor and patch
Sign releases, keep an SBOM per release, and log security events with alerts that someone owns. When a vulnerability appears, follow the response plan: confirm, fix, disclose, and review the root cause.
How we chose
We built this guide around NIST SP 800-218 (SSDF version 1.1) and the OWASP Top 10:2025, the two frameworks most teams use to structure secure development. Facts were checked in November 2026 against NIST's and OWASP's own published pages. No paid placement influenced the content.
Frequently asked questions
What is the difference between SAST and DAST?
Static analysis (SAST) scans source code without running it, and it catches injection, cryptography and coding flaws early. Dynamic testing (DAST) probes the running application and finds configuration and runtime problems. Most teams need both, because each finds flaws the other misses.
Is the OWASP Top 10 a testing standard?
No. OWASP calls the Top 10 an awareness document, not a testing standard. It lists the ten most critical risk categories to design against. For verifiable requirements, teams use the OWASP Application Security Verification Standard (ASVS) instead.
What is an SBOM and why does it matter?
A software bill of materials (SBOM) is a list of every component inside a piece of software, including libraries and their versions. It matters because it lets a team find every product affected by a newly disclosed vulnerability in minutes instead of days.
How often should dependencies be scanned?
Dependencies should be scanned on every build, and the full inventory should be reviewed at least monthly. New vulnerabilities are disclosed constantly, so a scan from three months ago says nothing about today's risk.
Do small teams need all of this?
Small teams need the same practices, scaled down. A short threat model, parameterized queries, dependency scanning in the pipeline and a written response plan cover most of the risk. The frameworks are designed to fit any team size.
What should we do first if we have no security process?
Start with the three highest-impact steps: run dependency scanning in the pipeline, add access control tests for other users' data, and write down a vulnerability response plan with a named owner. Those three close the most common gaps.
Sources
- OWASP Top 10 — OWASP Developer Guide
- Secure Software Development Framework — NIST CSRC
- NIST SP 800-218, Secure Software Development Framework (SSDF) Version 1.1
- OWASP Top 10: Vulnerabilities, Risks and How to Fix Them — SentinelOne
Saima Akther is an SEO and AEO enthusiast who writes Serplark’s best-of lists and guides on SEO tools, answer engine optimization and AI search. Published . Spot an error or a missing tool? Tell us and we will check it.