Skip to content

DevSecOps pipeline designed to deploy a containerized Malware Detection Dashboard onto AWS. Utilizing Terraform for Infrastructure as Code and Jenkins for CI/CD, the project integrates a "Security-First" approach by using Trivy to scan for vulnerabilities before deployment. The application is containerized with Docker and hosted on an EC2 instance,

Notifications You must be signed in to change notification settings

aryan9653/malware-detection-devsecops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevSecOps Pipeline

📌 Project Overview

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.

🏗️ Architecture Explanation

  1. Infrastructure as Code (IaC): AWS resources (EC2, Security Groups) provisioned via Terraform.
  2. Continuous Integration: Jenkins automates the build process.
  3. Security Scanning: Trivy scans the Terraform files for vulnerabilities before deployment.
  4. Containerization: The app is built into a Docker image.
  5. Cloud Deployment: Hosted on AWS EC2 (t3.small) and accessible via a public IP on port 3001.

📊 Security & Deployment Reports

1. Initial Infrastructure Vulnerabilities

The pipeline's security gate (Trivy) successfully identified critical misconfigurations in the Terraform code, specifically regarding unrestricted public ingress.

Caught Vulnerabilities

2. Jenkins Pipeline Failure

This screenshot shows the pipeline stopping the deployment because the security requirements were not met, demonstrating the "Security-First" approach.

Jenkins Failure

3. Successful Remediation & Build

After using GenAI to remediate the security group rules and scale the instance, the Jenkins pipeline completed all stages successfully.

Successful Jenkins

4. AWS Cloud Instance Status

Proof of the provisioned t3.small instance running in the AWS Mumbai region.

Successful Instance

5. Final Application Success

The application is live and accessible.

Live App

6. Live Preview Of Application on EC2 instance

App is running on EC2 instance

LivePreview


🤖 GenAI Usage Log (Mandatory)

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.micro to t3.small to provide 2GB of RAM.
  • Optimization: Using a .dockerignore file and a docker system prune command in the Jenkinsfile to manage disk space.

🎥 Video Recording

Click here to watch the full project demonstration


🚀 How to Run Locally

  1. Clone the repo.
  2. Build the image: docker-compose build
  3. Run: docker-compose up
  4. Access at http://localhost:3001

About

DevSecOps pipeline designed to deploy a containerized Malware Detection Dashboard onto AWS. Utilizing Terraform for Infrastructure as Code and Jenkins for CI/CD, the project integrates a "Security-First" approach by using Trivy to scan for vulnerabilities before deployment. The application is containerized with Docker and hosted on an EC2 instance,

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages