Skip to main content

Developer security training: curriculum and resources

Developers write the code that attackers exploit. Every SQL injection, every XSS vulnerability, every authentication bypass exists because a developer wrote code that way. This isn't blame — it's reality. And the solution isn't security teams reviewing every line of code. It's developers who understand security and build it in from the start.

Security-aware developers don't just avoid vulnerabilities. They think like attackers. They question assumptions. They ask "what could go wrong?" before shipping. They build defense in depth, not security as an afterthought.

This article provides a comprehensive security training curriculum for developers: what topics to cover, learning resources for each, and structured learning paths from junior to senior level.

Three-part series

This is Part 1 of the developer security training series:

  1. Curriculum and resources (this article) — what to teach
  2. Assessment and competency mapping — how to evaluate skills
  3. Implementation guide — how to roll out the program

Why developer security training matters

The economics are clear: fixing a vulnerability in development costs 6x less than fixing it in production. Finding it during design costs 15x less than post-release. Developer security knowledge is the most cost-effective security investment you can make.

Most vulnerabilities are preventable. The OWASP Top 10 hasn't changed dramatically in 20 years. SQL injection, XSS, broken access control — we know these vulnerabilities exist. We know how to prevent them. Yet they keep appearing in new code because developers aren't taught to avoid them.

Security teams can't scale. Even if you have security specialists, they can't review every commit. The ratio of developers to security engineers is typically 100:1 or worse. Developers must be the first line of defense.

Shift-left requires developer knowledge. DevSecOps means integrating security into development. But developers can't fix SAST findings they don't understand. They can't threat model features they're building without security knowledge.

It's a career differentiator. Developers with security skills are in high demand. Security knowledge increases earning potential and opens paths to specialized roles (Application Security, Security Engineering).

Security competency framework

Before training developers, define what "security competency" means for your organization. Here's a framework:

Competency levels

LevelNameDescriptionExpected of
L1AwareUnderstands basic security concepts, recognizes common vulnerabilitiesAll developers
L2PractitionerWrites secure code consistently, can review others' code for securitySenior developers
L3ExpertDesigns secure systems, mentors others, leads security initiativesTech leads, architects
L4ChampionDrives security culture, represents team in security discussionsSecurity Champions

Competency areas

AreaL1: AwareL2: PractitionerL3: Expert
Secure codingKnows OWASP Top 10Prevents vulnerabilities in own codeReviews others' code, creates patterns
Authentication & authorizationUnderstands conceptsImplements correctlyDesigns auth systems
Data protectionKnows classificationHandles data securelyDesigns data protection strategies
Threat modelingUnderstands purposeParticipates in sessionsLeads threat modeling
Security testingRuns provided toolsWrites security testsCreates testing strategies
Incident responseReports issuesInvestigates and fixesLeads incident response
DependenciesUpdates when toldMonitors and managesCreates dependency policies

Role-based requirements

RoleMinimum levelFocus areas
Junior DeveloperL1Secure coding basics, OWASP Top 10
Mid-Level DeveloperL1-L2Secure coding, basic security testing
Senior DeveloperL2All areas, code review, mentoring
Tech LeadL2-L3Architecture, threat modeling, team practices
QA EngineerL1-L2Security testing, vulnerability verification
DevOps EngineerL2Infrastructure security, CI/CD security
Security ChampionL3-L4All areas, cultural leadership

Core curriculum for developers

1: Security fundamentals

Duration: 2-4 hours
Target: All developers (L1)

Topics:

  • CIA triad (Confidentiality, Integrity, Availability)
  • Defense in depth
  • Least privilege principle
  • Attack surface concept
  • Security vs. convenience tradeoffs
  • Threat landscape for web applications

Learning objectives:

  • Explain why security matters for developers
  • Identify common attack vectors
  • Understand basic security terminology
  • Recognize when to ask for security help

Resources:

ResourceTypeCostLink
OWASP Web Security Testing GuideGuideFreeowasp.org/www-project-web-security-testing-guide
PortSwigger Web Security AcademyInteractive courseFreeportswigger.net/web-security
Hack The Box AcademyHands-on labsFree tieracademy.hackthebox.com
TryHackMeBeginner-friendly labsFree tiertryhackme.com

2: OWASP Top 10 deep dive

Duration: 4-8 hours
Target: All developers (L1-L2)

The OWASP Top 10 represents the most critical web application security risks. Every developer should understand these vulnerabilities intimately.

OWASP Top 10 (2021):

#VulnerabilityWhat it isPrevention
A01Broken Access ControlUsers can access unauthorized resourcesCheck authorization on every request
A02Cryptographic FailuresSensitive data exposed via weak cryptoUse strong encryption, proper key management
A03InjectionUntrusted data executed as codeParameterized queries, input validation
A04Insecure DesignFlaws in architecture/designThreat modeling, secure design patterns
A05Security MisconfigurationDefault configs, unnecessary featuresHardening, minimal permissions
A06Vulnerable ComponentsUsing components with known vulnerabilitiesSCA scanning, updates
A07Auth FailuresBroken authentication mechanismsMFA, secure session management
A08Software & Data Integrity FailuresTrusting untrusted sourcesVerify signatures, integrity checks
A09Security Logging FailuresInsufficient logging for detectionComprehensive security logging
A10SSRFServer makes requests to attacker-controlled destinationsValidate and sanitize URLs

Hands-on practice:

PlatformDescriptionLink
OWASP WebGoatDeliberately insecure app for learninggithub.com/WebGoat/WebGoat
OWASP Juice ShopModern vulnerable appowasp.org/www-project-juice-shop
DVWADamn Vulnerable Web Applicationgithub.com/digininja/DVWA
HackTheBoxVulnerable machineshackthebox.com
PentesterLabGuided exercisespentesterlab.com

3: Secure coding by language

Duration: 4-6 hours per language
Target: Developers (L1-L2)

Security practices differ by language and framework. Provide language-specific training for your stack.

JavaScript/TypeScript

Key areas:

  • XSS prevention (output encoding, CSP)
  • Prototype pollution
  • npm dependency security
  • Secure authentication with JWTs
  • Server-side request validation
  • Safe JSON parsing

Resources:

ResourceTypeLink
OWASP Node.js Security Cheat SheetGuidecheatsheetseries.owasp.org
Node.js Security Best PracticesGuidenodejs.org/en/docs/guides/security
Snyk JavaScript SecurityBlog/Learningsnyk.io/learn/javascript-security
Secure Coding in Node.jsCoursepluralsight.com

Example: XSS prevention

// BAD: Direct HTML insertion
element.innerHTML = userInput; // XSS vulnerability

// GOOD: Text content (auto-escapes)
element.textContent = userInput;

// GOOD: DOMPurify for rich content
import DOMPurify from 'dompurify';
element.innerHTML = DOMPurify.sanitize(userInput);

// GOOD: Template literals with encoding
const safe = encodeHTML(userInput);
element.innerHTML = `<div>${safe}</div>`;

Python

Key areas:

  • SQL injection with ORMs
  • Command injection (subprocess)
  • Pickle deserialization
  • SSTI (Server-Side Template Injection)
  • Path traversal
  • Secure password hashing

Resources:

ResourceTypeLink
OWASP Python SecurityGuidecheatsheetseries.owasp.org
BanditSAST toolbandit.readthedocs.io
Real Python SecurityTutorialsrealpython.com/tutorials/security
Python Security Best PracticesCoursepluralsight.com

Example: SQL injection prevention

# BAD: String formatting (SQL injection)
query = f"SELECT * FROM users WHERE id = {user_id}"
cursor.execute(query)

# GOOD: Parameterized queries
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))

# GOOD: ORM usage (SQLAlchemy)
user = session.query(User).filter(User.id == user_id).first()

# GOOD: Django ORM
user = User.objects.get(id=user_id)

Java

Key areas:

  • SQL injection (JDBC, JPA)
  • XML External Entity (XXE)
  • Deserialization vulnerabilities
  • Spring Security configuration
  • Secure logging
  • Cryptography with JCA

Resources:

ResourceTypeLink
OWASP Java SecurityGuidecheatsheetseries.owasp.org
Spring Security ReferenceDocsdocs.spring.io/spring-security
Find Security BugsSAST toolfind-sec-bugs.github.io
Secure Coding Guidelines for JavaOracle Guideoracle.com

Go

Key areas:

  • Input validation
  • SQL injection with database/sql
  • Path traversal
  • Race conditions
  • Secure HTTP client configuration
  • Cryptography with crypto package

Resources:

ResourceTypeLink
OWASP Go SecurityGuidecheatsheetseries.owasp.org
Secure GoBookgithub.com/OWASP/Go-SCP
gosecSAST toolgithub.com/securego/gosec

PHP

Key areas:

  • SQL injection (PDO, mysqli)
  • XSS prevention
  • File upload vulnerabilities
  • Session security
  • include/require vulnerabilities
  • Password hashing with password_hash()

Resources:

ResourceTypeLink
OWASP PHP SecurityGuidecheatsheetseries.owasp.org
PHP: The Right Way - SecurityGuidephptherightway.com/#security
PsalmStatic analyzerpsalm.dev

C# / .NET

Key areas:

  • SQL injection with Entity Framework
  • XSS in Razor views
  • Antiforgery tokens (CSRF)
  • Secure deserialization
  • Cryptography with .NET APIs
  • Authentication with ASP.NET Identity

Resources:

ResourceTypeLink
OWASP .NET SecurityGuidecheatsheetseries.owasp.org
ASP.NET Core SecurityDocsdocs.microsoft.com/en-us/aspnet/core/security
Security Code ScanSAST toolsecurity-code-scan.github.io

4: Authentication and authorization

Duration: 4-6 hours
Target: Developers (L2)

Topics:

  • Authentication vs. authorization
  • Session management
  • JWT best practices and pitfalls
  • OAuth 2.0 and OpenID Connect
  • Password storage (bcrypt, Argon2)
  • MFA implementation
  • API authentication patterns
  • RBAC and ABAC

Common mistakes to teach:

// BAD: JWT in localStorage (XSS can steal it)
localStorage.setItem('token', jwt);

// BETTER: HttpOnly cookie (not accessible via JavaScript)
// Set via response header:
// Set-Cookie: token=jwt; HttpOnly; Secure; SameSite=Strict

// BAD: Checking JWT signature but not expiration
const decoded = jwt.verify(token, secret);
// Token could be expired!

// GOOD: Verify all claims
const decoded = jwt.verify(token, secret, {
algorithms: ['HS256'],
maxAge: '1h',
issuer: 'your-app'
});

Resources:

ResourceTypeLink
OWASP Authentication Cheat SheetGuidecheatsheetseries.owasp.org
OAuth 2.0 SimplifiedBookoauth.com
Auth0 BlogArticlesauth0.com/blog
JWT.ioLearningjwt.io/introduction

5: Security testing for developers

Duration: 4-6 hours
Target: Developers and QA (L2)

Developers should write security tests, not just rely on security teams.

Types of security testing:

TypeWhat it testsWhen to useTools
Unit tests for securityIndividual security functionsEvery commitJest, pytest, JUnit
Integration security testsAuth flows, access controlEvery PRSupertest, requests
SASTSource code patternsCI/CDSemgrep, CodeQL, Bandit
DASTRunning applicationStagingOWASP ZAP, Nuclei
Dependency scanningKnown CVEs in librariesEvery buildSnyk, Dependabot
Fuzz testingEdge cases, crashesPeriodicAFL, libFuzzer

Writing security tests:

// Authentication tests
describe('Authentication', () => {
test('should reject invalid credentials', async () => {
const res = await request(app)
.post('/api/login')
.send({ username: 'user', password: 'wrong' });
expect(res.status).toBe(401);
});

test('should not leak user existence via timing', async () => {
const start1 = Date.now();
await request(app).post('/api/login').send({ username: 'exists', password: 'wrong' });
const time1 = Date.now() - start1;

const start2 = Date.now();
await request(app).post('/api/login').send({ username: 'nonexistent', password: 'wrong' });
const time2 = Date.now() - start2;

// Response times should be similar
expect(Math.abs(time1 - time2)).toBeLessThan(50);
});
});

// Authorization tests
describe('Authorization', () => {
test('should deny access to other users resources', async () => {
const user1Token = await login('user1', 'password1');
const res = await request(app)
.get('/api/users/user2/data')
.set('Authorization', `Bearer ${user1Token}`);
expect(res.status).toBe(403);
});
});

// Input validation tests
describe('Input Validation', () => {
test('should reject SQL injection attempts', async () => {
const res = await request(app)
.get('/api/users')
.query({ id: "1' OR '1'='1" });
expect(res.status).toBe(400);
});

test('should reject XSS in user input', async () => {
const res = await request(app)
.post('/api/comments')
.send({ text: '<script>alert("xss")</script>' });
// Either reject or sanitize
expect(res.body.text).not.toContain('<script>');
});
});

Resources:

ResourceTypeLink
OWASP Testing GuideComprehensive guideowasp.org/www-project-web-security-testing-guide
BDD SecurityFrameworkgithub.com/iriusrisk/bdd-security
OWASP ZAPDAST toolzaproxy.org
NucleiTemplate-based scannernuclei.projectdiscovery.io

6: Threat modeling

Duration: 2-4 hours
Target: Senior developers, Tech leads (L2-L3)

Threat modeling identifies security issues during design, before code is written.

STRIDE model:

ThreatDescriptionExampleMitigation
SpoofingPretending to be someone elseStolen credentialsStrong authentication, MFA
TamperingModifying dataChanging prices in cartIntegrity checks, signatures
RepudiationDenying actions"I didn't make that purchase"Audit logging
Information DisclosureData exposureDatabase dumpEncryption, access control
Denial of ServiceMaking system unavailableDDoS attackRate limiting, scaling
Elevation of PrivilegeGaining unauthorized accessAdmin access without being adminLeast privilege, RBAC

Simple threat modeling process:

  1. What are we building? Draw a data flow diagram. Identify components, data stores, and trust boundaries.
  2. What can go wrong? Apply STRIDE to each component. Brainstorm attack scenarios.
  3. What are we going to do about it? Prioritize threats (likelihood × impact). Define mitigations. Create security requirements.
  4. Did we do a good job? Review model completeness. Verify mitigations are implemented. Update the model as the design changes.

Resources:

ResourceTypeLink
OWASP Threat ModelingGuideowasp.org/www-community/Threat_Modeling
Microsoft Threat Modeling ToolToolmicrosoft.com/en-us/securityengineering/sdl/threatmodeling
Threat Modeling: Designing for SecurityBookAdam Shostack
OWASP Threat DragonOpen source toolowasp.org/www-project-threat-dragon

Security training for QA engineers

QA engineers are force multipliers for security. They already think about edge cases and breaking things — security testing is a natural extension.

Security testing curriculum for QA

ModuleTopicsDuration
Security testing basicsVulnerability types, OWASP Top 10, testing mindset4 hours
Manual security testingBurp Suite basics, Intercepting requests, testing auth8 hours
Automated security testingOWASP ZAP, Nuclei, CI integration4 hours
API security testingAPI vulnerabilities, Postman security tests, fuzzing4 hours
Reporting vulnerabilitiesWriting good bug reports, severity assessment2 hours

Tools for QA security testing

ToolPurposeLearning curveLink
Burp Suite CommunityWeb proxy, manual testingMediumportswigger.net/burp
OWASP ZAPWeb scanner, free alternative to BurpMediumzaproxy.org
PostmanAPI testing with security testsLowpostman.com
NucleiTemplate-based scanningLownuclei.projectdiscovery.io
Browser DevToolsRequest inspection, cookie analysisLowBuilt-in

QA security testing checklist

## QA Security Testing Checklist

### Authentication
- [ ] Test with invalid credentials
- [ ] Test account lockout after failed attempts
- [ ] Test password reset flow for account enumeration
- [ ] Test session timeout
- [ ] Test concurrent session handling
- [ ] Test remember me functionality

### Authorization
- [ ] Test accessing other users' data (IDOR)
- [ ] Test role-based access (can user access admin?)
- [ ] Test function-level access control
- [ ] Test after logout (can cached pages be accessed?)

### Input validation
- [ ] Test with SQL injection payloads
- [ ] Test with XSS payloads
- [ ] Test with special characters
- [ ] Test with very long inputs
- [ ] Test with empty/null inputs
- [ ] Test with unexpected data types

### Business logic
- [ ] Test race conditions (submit twice quickly)
- [ ] Test workflow bypass (skip steps)
- [ ] Test negative values (negative quantity, negative price)
- [ ] Test integer overflow

### Files
- [ ] Test uploading executable files
- [ ] Test uploading oversized files
- [ ] Test path traversal in filenames
- [ ] Test accessing files without authorization

### API specific
- [ ] Test with missing authentication
- [ ] Test with tampered tokens
- [ ] Test rate limiting
- [ ] Test for mass assignment
- [ ] Test for excessive data exposure

Burp Suite basics for QA

Setup: Configure proxy (127.0.0.1:8080), install Burp CA certificate in browser, browse the application — Burp captures all traffic.

Key tabs:

  • Proxy → HTTP history — see all requests
  • Repeater — modify and resend individual requests
  • Intruder — automated payload testing
  • Scanner — automated vulnerability scanning (Pro only)

Common tests: change user ID in URL (IDOR) · modify JSON body (authorization) · remove auth headers (auth requirements) · inject payloads (input validation)

Comprehensive learning paths

Junior developer path (0-2 years)

Months 1-3: Foundations

  • Security fundamentals course
  • OWASP Top 10 training
  • Language-specific secure coding basics
  • Assessment: Security quiz (pass 80%)

Months 4-6: Practical skills

  • Complete PortSwigger Web Security Academy (basics)
  • Practice on WebGoat
  • Write first security unit tests
  • Assessment: Find 3 vulnerabilities in test app

Months 7-12: Integration

  • Apply secure coding in daily work
  • Participate in security code reviews
  • Join CTF event
  • Assessment: Secure code review exercise

Target by end of year: L1 competency in all areas

Mid-level developer path (2-5 years)

Quarter 1:

  • Advanced OWASP training
  • Authentication and authorization deep dive
  • Assessment: Intermediate security quiz

Quarter 2:

  • Security testing with Burp Suite
  • API security
  • Assessment: Find vulnerabilities using Burp

Quarter 3:

  • Threat modeling introduction
  • Participate in threat model session
  • Assessment: Lead threat model for small feature

Quarter 4:

  • Mentor junior developer
  • Contribute to security documentation
  • Assessment: Code review with security focus

Target by end of year: L2 competency, ready for security champion role

Senior developer / Tech lead path

Focus areas:

  • Architecture security
  • Leading threat modeling sessions
  • Security requirements for new projects
  • Mentoring others
  • Security incident response

Activities:

  • Complete threat modeling course
  • Lead 3+ threat modeling sessions
  • Review security architecture for new projects
  • Present at internal tech talk on security topic
  • Participate in incident response exercise

Target: L3 competency, security champion or working with security team

Self-check questions

  1. What are the four levels in the security competency framework?
  2. Which OWASP Top 10 vulnerability involves executing untrusted data as code?
  3. Why is parameterized query safer than string interpolation for SQL?
  4. What's the difference between SAST and DAST?
  5. What does STRIDE stand for?
  6. Why should QA engineers learn security testing?

Courses and training

ResourceTypeCostLink
PortSwigger Web Security AcademyInteractiveFreeportswigger.net/web-security
OWASP WebGoatHands-onFreeowasp.org/www-project-webgoat
Hack The Box AcademyLabsFree tieracademy.hackthebox.com
TryHackMeBeginner labsFree tiertryhackme.com
PentesterLabExercises$20/monthpentesterlab.com
SANS Secure CodingCertificationPaidsans.org

Cheat sheets and guides

SAST tools by language

LanguageToolLink
Multi-languageSemgrepsemgrep.dev
Multi-languageCodeQLcodeql.github.com
PythonBanditbandit.readthedocs.io
JavaScriptESLint security pluginsgithub.com/eslint-community/eslint-plugin-security
JavaFind Security Bugsfind-sec-bugs.github.io
Gogosecgithub.com/securego/gosec
C#Security Code Scansecurity-code-scan.github.io

Vulnerable applications for practice

CTF platforms

Conclusion

A curriculum that doesn't map to what your developers actually build is wasted effort. Start with what you know — your stack, your vulnerabilities, your incidents — and build from there.

The goal isn't to turn every developer into a security expert. It's to make them fluent enough that they don't introduce the same categories of bugs twice.

What's next

Next: assessment and competency mapping — how to evaluate where your developers are before you start training.