This project demonstrates a complete DevSecOps Lifecycle for a Next.js Malware Detection Dashboard. The goal was to build a secure, automated pipeline that provisions cloud infrastructure, identifies security misconfigurations using AI, and deploys the application in a containerized environment on AWS.
- Infrastructure as Code (IaC): AWS resources (EC2, Security Groups) provisioned via Terraform.
- Continuous Integration: Jenkins automates the build process.
- Security Scanning: Trivy scans the Terraform files for vulnerabilities before deployment.
- Containerization: The app is built into a Docker image.
- Cloud Deployment: Hosted on AWS EC2 (t3.small) and accessible via a public IP on port 3001.
The pipeline's security gate (Trivy) successfully identified critical misconfigurations in the Terraform code, specifically regarding unrestricted public ingress.
This screenshot shows the pipeline stopping the deployment because the security requirements were not met, demonstrating the "Security-First" approach.
After using GenAI to remediate the security group rules and scale the instance, the Jenkins pipeline completed all stages successfully.
Proof of the provisioned t3.small instance running in the AWS Mumbai region.
The application is live and accessible.
App is running on EC2 instance
1. The AI Prompt Used:
"How do I fix the Trivy error 'Security group rule allows ingress from public internet' and resolve 'No space left on device' on my AWS instance during a Jenkins build?"
2. Summary of Identified Risks:
The AI identified that open ingress rules (0.0.0.0/0) allow the server to be targeted by brute-force attacks. It also diagnosed that the t3.micro instance was insufficient for the Next.js build process, leading to disk space and memory crashes.
3. AI-Recommended Improvements:
- Security: Restricting CIDR blocks to specific IPs for SSH and web access.
- Performance: Vertically scaling the EC2 instance from
t3.microtot3.smallto provide 2GB of RAM. - Optimization: Using a
.dockerignorefile and adocker system prunecommand in the Jenkinsfile to manage disk space.
Click here to watch the full project demonstration
- Clone the repo.
- Build the image:
docker-compose build - Run:
docker-compose up - Access at
http://localhost:3001





