Cybersecurity and AI Architecture Fellow of the British Computer Society (FBCS)
2-Day Course · Foundation · Hands-on
Secure Coding · SEC-101

Introduction to Secure Coding with AI

Build secure software from day one. This two-day foundation course covers the OWASP Top 10, injection defense, authentication, session management, XSS prevention and how to use AI coding assistants (Claude, GPT) as security-aware partners. Hands-on labs on a deliberately vulnerable application.

SEC-101. The syllabus

Two days, from zero to secure

A hands-on foundation covering the most common web application vulnerabilities and their defenses. Every module includes code-level exercises. (Times are approximate.)

Day 1 Morning

Foundations of Secure Coding

S1-00 Course Introduction and Threat Landscape 1 hr

Set the stage for the course by walking through the current application threat landscape. Understand why secure coding matters, how attackers think and how the OWASP Top 10 frames the most common web application risks. This module grounds every technique that follows in real-world breach data.

S1-01 OWASP Top 10 Walkthrough 1.5 hrs

A practical walkthrough of every item in the OWASP Top 10 (2021 edition), with code samples showing the vulnerable pattern and the secure pattern side by side. Each item is linked to the ASVS verification requirement that addresses it, giving you both the problem and the measuring stick.

S1-02 Input Validation Fundamentals 1.5 hrs

Input validation is the first line of defense. Learn allowlist vs denylist, type/length/range/format checks, canonicalization, and where validation sits relative to encoding and sanitization. Hands-on exercises in Python and Node.js validate user input against strict schemas.

S1-03 Output Encoding by Context 1 hr

Output encoding prevents injection by making data safe for the context it appears in: HTML body, HTML attribute, JavaScript, CSS, URL. Walk through each context, see what happens when encoding is missing, and implement context-aware encoding using standard libraries.

S1-04 Authentication Basics: Password Hashing and Sessions 1.5 hrs

Build authentication the right way. Hash passwords with bcrypt and Argon2id. Create sessions with cryptographically random tokens. Set secure cookie attributes (HttpOnly, Secure, SameSite). Understand why MD5 and SHA-256 are not password hashing algorithms.

Day 1 Afternoon

Injection and XSS Defense

S1-05 SQL Injection Prevention Hands-On 1.5 hrs

Start by exploiting SQL injection against a vulnerable lab app. Extract data, bypass authentication, and escalate. Then fix every vulnerability using parameterized queries, stored procedures, and ORM patterns. Cover second-order injection and how it bypasses naive input filtering.

S1-06 XSS Defense Hands-On 1.5 hrs

Exploit reflected, stored and DOM-based XSS in the lab application. Steal session cookies, redirect users, and deface pages. Then deploy the defenses: context-aware output encoding, Content Security Policy headers, and trusted types. Verify each fix blocks the corresponding attack.

S1-07 CSRF Protection 1 hr

Understand how cross-site request forgery works by forging a state-changing request from an attacker-controlled page. Implement synchronizer token patterns, double-submit cookies, and SameSite cookie attributes. See why CORS alone does not prevent CSRF.

Day 2 Morning

Error Handling, Headers and AI-Assisted Coding

S1-08 Secure Error Handling 1 hr

Errors are information leaks. Learn how to handle errors without exposing stack traces, database schemas, file paths or version numbers. Build centralized error handlers that log full detail internally while returning safe messages to the client. Cover custom error pages and error response schemas.

S1-09 Security Headers in Practice 1 hr

Deploy the full set of security headers: HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy. Use browser dev tools to verify each header is active and correctly configured. Understand what each header protects against and what it does not.

S1-10 Using Claude and GPT as Secure Coding Partners 1.5 hrs

AI coding assistants are powerful but they generate insecure patterns by default. Learn how to prompt Claude and GPT for security-aware code generation, how to review AI-generated code for common vulnerability patterns, and how to use the ASVS Secure Coder Prompt Pack to steer output toward verified secure patterns.

S1-11 Dependency and Supply Chain Basics 1 hr

Your application is mostly other people's code. Learn how to audit your dependency tree, check for known vulnerabilities using tools like npm audit, pip-audit and Snyk, and set policies for acceptable dependency risk. Understand lockfiles, pinning, and what happens when a maintainer goes rogue.

Day 2 Afternoon

Labs and Capstone

S1-12 File Upload and Path Traversal 1 hr

Exploit unrestricted file uploads to achieve remote code execution. Exploit path traversal to read arbitrary files from the server. Then implement the fixes: file type validation, content inspection, filename sanitization, isolated storage, and chroot-style path containment.

S1-13 Secure Logging Fundamentals 0.5 hr

Log the right things and never log the wrong things. Learn what to capture for security monitoring (authentication events, authorization failures, input validation failures) and what to exclude (passwords, tokens, PII). Implement structured logging that feeds into SIEM tools.

S1-14 Capstone Lab: Find and Fix 2 hrs

Given a deliberately vulnerable web application with at least 15 planted vulnerabilities spanning the full OWASP Top 10, find as many as you can, document each one, and fix it. Scored and debriefed as a group. This is the exercise that proves you can apply everything from the course.

S1-15 Course Wrap-Up and Secure Coding Checklist 0.5 hr

Review the secure coding checklist you will take away. Cover ongoing learning resources, how to integrate secure coding into daily development, and how to use the ASVS as a self-assessment tool after the course.

~24 hrs
Total instructional hours
20
Individual modules
2 days
Delivery days
Reserve a place

Learn to write secure code, from the ground up.

Two days of hands-on secure coding, covering the full OWASP Top 10, with AI-assisted coding techniques using Claude and GPT. Foundation level, no prior security experience required.

2 days hands-on 15+ vulnerabilities in the capstone Private corporate cohorts available
Reserve a Place

Corporate and sovereign cohorts, and bespoke on-site delivery, on request.