Full course

Secure Coding with AI

This intensive course teaches developers how to use AI coding assistants such as GitHub Copilot, Codex and Claude Code to write, review and fix secure code. It combines OWASP secure-coding best practices with labs on vulnerable Java and .NET applications.

Details

Course overview

The course has two aims: to bring the whole development team to a shared level on web application security, including how an attacker works, and to teach developers to use AI coding assistants to find, fix and prevent vulnerabilities, in existing code as well as in new projects. Theory alternates with hands-on labs: participants exploit a vulnerability on a deliberately vulnerable application, fix it with AI and verify the result, and along the way build a new, secure application one vulnerability class at a time. The work follows OWASP guidance and uses GitHub Copilot (with OpenAI and Anthropic models), Codex, Claude Code, Burp Suite and Semgrep; the language of the new application is agreed with the client in advance. It is intended for developers who want to sharpen their application security skills and learn to use AI when writing secure code, without trusting it blindly. No previous experience with AI tools is needed.

Requirements

  • Basic knowledge of the architecture and functioning of web applications

  • Basic knowledge of at least one backend language (e.g. Java or .NET); no prior experience with AI tools required

Course content

  • Introduction to secure coding: fundamental principles, the OWASP Top 10 and the Secure SDLC.

  • How AI coding assistants work: a conceptual overview of LLMs and their role in software development.

  • Limits and risks of AI-generated code: insecure-by-default output, outdated or insecure libraries, and hallucinated packages (slopsquatting).

  • Governance of AI tools in the enterprise: usage policies, protection of sensitive data, and cost and usage management.

  • Burp Suite introduction: intercepting and inspecting application traffic to understand its behavior.


  • How prompt formulation affects the security of the generated code, and why generic instructions are not enough.

  • Security-focused prompting: stating input validation, output encoding, error handling and cryptography requirements explicitly.

  • Recursive Criticism and Improvement (RCI): generating, self-reviewing and fixing code iteratively to reduce vulnerability density.

  • Zero-Shot Chain-of-Thought, and the pitfalls of generic and persona-based prompting.

  • Security instruction files for AI assistants: what they are, how to structure them and best practices.


  • Authentication vulnerabilities and defense: user enumeration, authentication bypass, default credentials and password reset flows.

  • JWT: understanding JSON Web Tokens and their secure use in authentication.

  • Authorization and Access Control: parameter manipulation, access matrix and business-logic bypass.

  • SQL injection: exploitation and prevention with parameterized queries; fixes applied and verified with AI.


  • Cross-Site Scripting (XSS) and output encoding.

  • Open Redirect: identification and prevention.

  • CSRF and CORS security.

  • Arbitrary File Upload: secure handling of uploaded files.

  • XXE (in-band and out-of-band) and SSRF: exploited on the vulnerable lab applications, then remediated with AI and verified.


  • Integrating SAST tools (Semgrep) with AI in a verification loop, and understanding how they differ from AI-only analysis.

  • Supply-chain risks of AI-suggested dependencies (hallucinated or outdated packages) and how to verify them.

  • Offensive use of AI: payload generation and attack-surface analysis.

  • Final security testing and retest of the application developed during the course.


Your instructor

  • TBD Senior Instructor

Related courses
  • Full course

    Build Secure Web Applications

    Defensive
    ~32 hours
    Online

    Language-independent secure coding for the web: the main vulnerability classes and how to defend against them.

    DISCOVER MORE
  • best-seller

    Full course

    Build Secure Java Web Applications

    Defensive
    ~32 hours
    Online

    Secure coding for Java and Spring: prevent the common vulnerabilities with Spring Security and safe defaults.

    DISCOVER MORE
  • best-seller

    Full course

    Build Secure .NET Web Applications

    Defensive
    ~32 hours
    Online

    Secure coding for ASP.NET Core: find and fix .NET vulnerabilities with the framework's built-in security features.

    DISCOVER MORE
  • Full course

    Web Application Penetration Testing

    Offensive
    ~32 hours
    Online

    Black-box and gray-box testing of web applications with Burp Suite, based on the OWASP WSTG methodology.

    DISCOVER MORE