SecureCode: Security-Aware AI Training Dataset
Abstract
AI coding assistants produce vulnerable code in 45% of security-relevant scenarios [Veracode, 2025], yet no public training dataset teaches both traditional web security and AI/ML-specific defenses in a format suitable for instruction tuning. We present SecureCode, a production-grade dataset of 2,372 multi-turn security training examples spanning two domains: web application security (1,625 examples covering the OWASP Top 10 2021 across 11 languages and 9 frameworks) and AI/ML security (747 examples covering all 10 OWASP LLM Top 10 2025 categories across 40+ frameworks including LangChain, OpenAI, and HuggingFace). A 2026 grounding audit (Section 5.6) independently re-verified every reference and corrected the datasets grounding claims: we report the fraction of examples tied to a documented incident or verified CVE rather than asserting complete grounding. Every example follows a 4-turn conversational structure—feature request, vulnerable and secure implementations with attack demonstrations, advanced probing, and defense-in-depth operational guidance—designed for direct use in instruction tuning pipelines.