Most organisations can prove developers completed a secure coding course, but very few can show it changed the code they ship. Developer security training is required by several frameworks, including NIST SSDF task PO.2.2, PCI DSS Requirement 6.2.2 and CIS Controls v8.1 Safeguard 16.9, yet generic annual videos rarely reduce vulnerability rates. This guide sets out how to design a developer training programme that meets those requirements and also moves engineering metrics: role and technology-specific curricula, hands-on labs, just-in-time training tied to real findings, training on secrets and non-human credentials, and governance of AI coding assistants. It covers rollout, measurement, failure patterns and framework mapping, and is written for AppSec leads, engineering managers and the people who own security awareness budgets.
Key takeaways
- Role-based, not one-size-fits-all. NIST SSDF PO.2.2 asks for role-based training for all personnel who contribute to secure development, with outcomes documented per role and proficiency reviewed periodically.
- Annual is the compliance floor. PCI DSS 6.2.2 and CIS Safeguard 16.9 expect training at least once every 12 months; effective programmes add continuous, just-in-time learning on top.
- Teach the stack people use. OWASP SAMM's Education and Guidance practice moves from general awareness to technology and role-specific training, then to in-house curricula with competence testing.
- Credentials deserve their own module. Hard-coded secrets, over-scoped tokens and leaked CI credentials are among the most common and damaging developer mistakes.
- Measure behaviour, not completion. Track recurrence of vulnerability classes, time to fix and secrets-detection hits per developer team alongside completion rates.
What the frameworks require
| Source | Requirement | What an assessor or auditor looks for |
|---|---|---|
| NIST SP 800-218 SSDF PO.2 | PO.2.1 define SDLC roles and responsibilities; PO.2.2 "provide role-based training for all personnel with responsibilities that contribute to secure development" and periodically review proficiency; PO.2.3 obtain and convey upper management commitment | Documented training outcomes and plans per role, evidence of proficiency review, management sponsorship |
| PCI DSS v4.0.1 Requirement 6.2.2 | Software development personnel working on bespoke and custom software are trained at least once every 12 months on software security relevant to their job function and development languages, including secure software design, secure coding techniques and the use of security testing tools | Training records per developer, content relevant to the languages in use, annual cadence |
| CIS Controls v8.1 Safeguard 16.9 (IG2, IG3) | Train developers in application security concepts and secure coding, role and environment-specific, at least annually | Curriculum, completion records |
| NIST SP 800-53 Rev. 5 | AT-3 Role-based Training, AT-4 Training Records, AT-2 Literacy Training and Awareness | Role-based training before access and on change, retained records |
| NIST CSF 2.0 | PR.AT-02: individuals in specialised roles receive training to perform relevant tasks with security risks in mind | Programme coverage of specialised roles |
| ISO/IEC 27001:2022 Annex A | A.6.3 information security awareness, education and training; A.8.28 secure coding | Evidence that secure coding principles are known and applied |
The SSDF's notional implementation examples for PO.2.2 are a useful programme design checklist in their own right: document the desired outcomes of training for each role, define the curriculum for each role, create a training plan for each role, acquire or create the training (customising acquired training), and measure outcome performance to find where training should change. For the wider application security control set, see the CIS Control 16 Application Software Security Guide.
Designing the curriculum by role
OWASP SAMM's activity "Customize security training" describes product managers training on security requirements, threat modelling and defect tracking, developers training on coding standards and best practices for the technologies they work with, and testers and auditors training on testing approaches. A practical breakdown:
| Role | Core topics | Format | Cadence |
|---|---|---|---|
| All developers | Common web and API weaknesses (OWASP Top 10, API Security Top 10), input handling, authentication and session basics, secrets hygiene, dependency risk | Hands-on labs in the team's language | Onboarding plus annual refresh |
| Backend and API developers | Authorisation design, object-level access control, injection, SSRF, token validation, rate limiting | Labs and code review exercises on real patterns | Annual plus just-in-time |
| Frontend and mobile developers | XSS and output encoding, CSP, client-side storage, mobile platform controls (OWASP MASVS) | Labs | Annual plus just-in-time |
| Platform, DevOps and SRE | CI/CD identities, pipeline permissions, infrastructure as code misconfiguration, container hardening, cloud IAM | Scenario workshops | Annual and on major platform change |
| Architects and tech leads | Threat modelling, secure design principles, security requirements, cryptography choices | Facilitated workshops on live designs | Annual plus per major design |
| Product managers | Security requirements, abuse cases, risk acceptance, vulnerability SLAs | Short briefings | Annual |
| QA and test engineers | Security test cases, using DAST and fuzzing tools, verifying fixes | Labs | Annual |
| Security champions | Deeper coverage of all the above, triage of tool findings, review techniques | Cohort programme | Ongoing |
Language matters: PCI DSS 6.2.2 ties training to "development languages", and memory safety issues dominate in C and C++ while deserialisation and injection dominate elsewhere. Link learners to language-specific material such as the Secure Coding Guide, the C and C++ Secure Coding Guide and the Go Secure Coding Guide.
Where identity fits: secrets, tokens and machine credentials
Credential handling deserves a dedicated module because developer mistakes with non-human identities are frequent and directly exploitable. Researchers who scanned PyPI found 3,938 unique secrets across 2,922 projects, 768 of them valid, mostly hard-coded in test folders, configuration files and READMEs, as described in the PyPI Secrets Exposure 2023 analysis. The module should teach:
- Never commit secrets: use a secrets manager or environment injection, keep
.envfiles out of version control, and understand that removing a secret from the latest commit does not remove it from history or from published releases. Rotation is the only fix. - Least-privilege tokens: request the narrowest scopes and shortest lifetimes for personal access tokens, API keys and cloud credentials; prefer workload identity federation (OIDC) over static keys in CI.
- Pipeline credentials: how secrets reach CI jobs, why fork pull requests must not see them, and why logs must never print them.
- Token validation in code: verifying JWT signatures, audiences and expiry, and not trusting identity claims from clients.
- Responding to a leak: who to call, how to revoke, and why speed matters. See the API Key Management Guide.
Training for AI-assisted development
AI coding assistants change what developers need to know. Training should cover reviewing generated code with the same scepticism as a junior colleague's pull request, recognising insecure suggestions (string-built SQL, disabled certificate checks, hard-coded keys), verifying that suggested packages actually exist before installing them, keeping secrets and customer data out of prompts, and understanding what the assistant or agent can access in the repository and terminal. Include the organisation's approved tools and configuration in onboarding. See the AI Coding Agents Security Guide and the GitHub Copilot Security Guide.
Delivery formats compared
| Format | Strengths | Weaknesses | Best use |
|---|---|---|---|
| Video or slide-based e-learning | Cheap, scalable, easy records | Low retention, rarely language-specific | Awareness and policy content only |
| Hands-on labs in the developer's language | Practice finding and fixing real flaws | Licence cost or build effort | Core annual secure coding training |
| Deliberately vulnerable applications (OWASP Juice Shop, WebGoat) | Free, realistic, good for workshops and CTFs | Must run isolated; generic stack | Workshops, champion cohorts, events |
| Just-in-time micro-lessons linked to findings | Taught when the problem is real | Needs tool integration | Continuous reinforcement from SAST, SCA and code review |
| Instructor-led workshops on your own code | Highest relevance; builds culture | Expensive, needs skilled facilitators | Threat modelling, architects, high-risk teams |
| CTFs and internal competitions | Engagement and community | Favour enthusiasts | Champion recruitment and culture |
OWASP describes Juice Shop as an insecure web application suitable for security trainings, awareness demos and CTFs, and WebGoat as a deliberately insecure application that is for educational purposes only. Run both in isolated environments that cannot reach production or the internet. See the Cyber Ranges, CTFs and Hands-On Training Guide.
Small versus large organisations: a small team can meet requirements with free labs (Juice Shop, WebGoat, OWASP Cheat Sheets), a monthly lunch-and-learn on recent findings and a short written secure coding standard. A large organisation should buy or build a lab platform covering its languages, integrate just-in-time lessons into its scanners, and run a champions network, which SAMM Level 1 describes as a security champion in each development team with set hours and additional training.
Maturity: from awareness to an in-house curriculum
OWASP SAMM's Education and Guidance practice has two streams, Training and Awareness and Organization and Culture, across three maturity levels. It is a useful way to decide what to build next.
| SAMM level | Training and Awareness stream | Organization and Culture stream | What it looks like in practice |
|---|---|---|---|
| 1 | Security awareness training for all personnel involved in software development, internal or procured, instructor-led or computer-based | Identify a security champion within each development team | Annual awareness course plus a named champion per team |
| 2 | Technology and role-specific training customised for product managers, developers, testers and auditors | A secure software centre of excellence of architects and senior developers with a charter, defining standards and practices | Language-specific labs; central team owning secure coding standards |
| 3 | A formal, in-house managed programme as part of onboarding with a defined curriculum, participation checks and competence tests | A secure software community with knowledge-sharing platforms across teams | Gated onboarding, internal content on your own frameworks, active community |
Choosing training content and providers
- Language and framework coverage: confirm labs exist for every language and major framework in your estate, not just the provider's headline languages.
- Realism: labs should require finding and fixing a flaw in working code, not answering multiple-choice questions about it.
- Mapping: content should map to CWE and to the OWASP lists you use, so findings can be linked to lessons automatically.
- Integration: check for integrations with your scanners, code review platform and identity provider (single sign-on and automated provisioning keep records accurate).
- Records and reporting: exportable per-developer completion and assessment records for PCI DSS and ISO audits.
- Data handling: if the platform analyses your code to personalise lessons, review what it stores and where.
- Freshness: ask how often content is updated for new vulnerability classes, including AI-generated code issues.
Rolling out the programme
- Baseline the problem. Pull 12 months of SAST, DAST, penetration test, bug bounty and secrets-scanning findings. Group by vulnerability class (CWE) and team. These classes become the curriculum priorities and the baseline for impact metrics.
- Define roles and outcomes. Follow SSDF PO.2.2: for each role, write the desired outcome ("backend developers can implement object-level authorisation checks and write a test that proves them").
- Secure sponsorship. PO.2.3 asks for upper management commitment conveyed to all developers. Agree protected time for training with engineering leadership; unprotected time is the commonest reason programmes stall.
- Pilot with two or three teams. Choose one high-risk team and one typical team; run the curriculum, collect feedback, and check lab relevance to their stack.
- Integrate with onboarding. SAMM Level 3 suggests requiring role and technology-specific training as part of onboarding and, for critical applications, considering restricting access until it is complete.
- Add just-in-time training. Link scanner findings and code review comments to short lessons on that weakness.
- Launch champions. Recruit volunteers, give them time and deeper training, and use them to localise content.
- Review and adjust. Every six months compare finding recurrence by class and team; retire modules that do not move the numbers and add ones for emerging classes.
If a mandatory module causes disruption (for example access gating blocks an urgent release), keep the gate but allow a time-limited, logged exception approved by the AppSec lead rather than removing the requirement.
Detection and measurement
| Metric | Why it matters | Source |
|---|---|---|
| Completion of role-required training within the period | Compliance evidence (PCI DSS 6.2.2, CIS 16.9, AT-4) | Learning platform |
| Recurrence rate of top vulnerability classes per team | Shows whether training changes code | SAST, code review, pentest findings by CWE |
| Mean time to remediate security findings | Trained developers fix faster and better | Issue tracker |
| Secrets-detection hits per 1,000 commits | Measures the credentials module | Secret scanning and push protection logs |
| Share of pull requests with security-relevant review comments resolved before merge | Culture and review skill | Code review platform |
| Proportion of teams with an active champion | Programme reach | Champion register |
Lab scores and assessment results show competence at a point in time; finding recurrence shows behaviour. Report both, and avoid naming individuals in leadership reports. See the AppSec Programme Metrics Guide.
Common failure patterns
- Completion as the only metric: 100% completion with flat vulnerability trends means the content or format is wrong.
- Generic content: Java examples for a Go and TypeScript estate lose developers in the first ten minutes and fail the PCI DSS "development languages" test.
- No protected time: training squeezed between sprint commitments gets clicked through.
- Ignoring credentials: programmes that cover the OWASP Top 10 but not secrets handling leave the most common real incident path untaught, as the PyPI case shows.
- Vulnerable training apps on the corporate network: labs exposed to the internet or production become an attack surface themselves.
- Champions without time or authority: SAMM describes champions with a set number of hours per week for security work. Volunteers asked to do it on top of a full delivery load burn out within a year, and the network quietly dissolves. Agree the time allocation with their managers in writing and recognise the work in performance reviews.
- Training disconnected from standards: courses that teach one pattern while the internal secure coding standard or the shared libraries require another confuse developers. Align labs with your own approved libraries and frameworks.
- No AI coding guidance: developers adopt assistants and agents faster than policy, and generated code bypasses the instincts training was meant to build.
Practitioner checklist
- Map training requirements from SSDF PO.2, PCI DSS 6.2.2, CIS 16.9 and ISO/IEC 27001 A.6.3 and A.8.28 to one programme.
- Baseline findings by CWE and team and use them to prioritise modules.
- Write role-based outcomes and training plans for every SDLC role.
- Deliver hands-on labs in the languages and frameworks actually used.
- Include a mandatory secrets, tokens and machine credentials module.
- Add AI coding assistant guidance to onboarding and annual training.
- Integrate just-in-time lessons with SAST, SCA and code review.
- Keep training records per developer for at least the audit period.
- Report recurrence and remediation metrics, not only completion, every six months.
Standards and references
- NIST: SP 800-218 Secure Software Development Framework
- PCI SSC: PCI DSS v4.0.1 (Document Library)
- CIS: Control 16 Application Software Security
- OWASP: SAMM Education and Guidance practice (model source)
- OWASP: Security Champions Guide
- OWASP: Juice Shop
- OWASP: WebGoat
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: CIS Control 16 Application Software Security Guide · Role-Based Security Training Programme Guide · Secure Code Review Guide · DevSecOps Guide