Web applications commonly process user-controlled input and perform backend database operations. If application input reaches database query processing without sufficient separation between application data and query logic, an attacker may manipulate the intended database operation through SQL Injection.
OWASP Juice Shop provides an intentionally vulnerable web application environment containing SQL Injection scenarios that can be used for controlled security testing and vulnerability validation.
In this use case, an existing OWASP Juice Shop application is deployed as a controlled Docker container in an Ubuntu virtual machine. The containerized application provides the target environment for reproducing the SQL Injection vulnerability before and after AI-assisted remediation.
Kali Linux is used as the controlled penetration-testing system.
A controlled SQL Injection Attack assessment is performed against the authorized laboratory application. The assessment first identifies the exposed application and selected SQL Injection functionality and then validates the vulnerable behavior using controlled security-testing inputs.
sqlmap is used as the primary SQL Injection penetration-testing tool because it is specifically designed to identify and validate SQL Injection vulnerabilities in web applications. Nmap is used for service discovery and network exposure assessment.
Semgrep is used for static security analysis of the vulnerable and patched source code. Docker is used to deploy and redeploy the vulnerable and patched application in isolated containers.
The SVM model is used to classify source-code samples according to SQL Injection-related vulnerability patterns. CodeT5+ 220M is used to transform identified vulnerable source code toward a security-improved implementation.
The public SQL Injection vulnerability-fix dataset is processed to obtain vulnerable and corresponding fixed source-code examples for vulnerability classification and vulnerable-to-fixed code transformation.
The generated security patch is then applied to a separate application source-code copy. A patched Docker image is built and deployed, and the same controlled SQL Injection assessment is repeated to determine whether the previously demonstrated vulnerability remains reproducible.
The complete security-validation workflow is:
OWASP Juice Shop Source Code
→
Docker Application Deployment
→
Network Service Discovery
→
SQL Injection Baseline Testing
→
Public Vulnerability-Fix Data Processing
→
SVM Vulnerability Classification
→
CodeT5+ 220M Code Transformation
→
Security Patch Generation
→
Static Security Analysis
→
Patched Docker Image
→
Application Redeployment
→
SQL Injection Reassessment
→
Before-and-After Security Validation