Skip to content

Repository files navigation

Network Security Model

This project implements a comprehensive Network Security Model using Python and machine learning. It includes modules for data ingestion, transformation, model training, logging, exception handling, and utility functions. The model is designed to detect phishing and other network threats using advanced analytics and automation.

Features

  • Data ingestion from CSV and database sources
  • Data transformation and preprocessing
  • Model training and evaluation
  • Exception handling and logging
  • Modular code structure for cloud, components, constants, entities, exceptions, logging, pipeline, and utilities
  • Docker support for containerized deployment

MLOps Pipeline & Deployment

This project follows a complete MLOps workflow:

  • Automated data ingestion, validation, transformation, and model training
  • Modular pipeline orchestration for reproducible ML workflows
  • CI/CD integration for automated testing and deployment
  • Containerized application using Docker
  • Deployment to AWS ECR (Elastic Container Registry) across 23 buckets for scalable production use
  • End-to-end automation from data to model serving

AWS ECR Deployment

The trained model and application are packaged as Docker images and pushed to 23 AWS ECR buckets, enabling robust, scalable, and secure deployment in cloud environments.

CI/CD

GitHub Actions and other CI/CD tools are used to automate build, test, and deployment steps, ensuring rapid iteration and reliable releases.

Project Structure

Network_Data/              # Contains phishing dataset
networksecurity/
  cloud/                   # Cloud-related utilities
  components/              # Model training and pipeline components
  constant/                # Project constants
  entity/                  # Data entities
  exception/               # Custom exception handling
  logging/                 # Logging utilities
  pipeline/                # ML pipeline code
  utils/                   # Utility functions
Dockerfile                 # For containerization
requirements.txt           # Python dependencies
setup.py                   # Project setup

Setup Instructions

  1. Clone the repository:
    git clone https://github.com/AkshitMaheshwari/NetworkSecurity.git
    cd NetworkSecurity
  2. Create and activate a virtual environment:
    python -m venv myenv
    .\myenv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Configure environment variables:
    • Create a .env file in the root directory and add any required variables (e.g., database URIs).

How to Run

  1. Start the application (if using FastAPI/Uvicorn):
    uvicorn app:app --reload
  2. Run model training or other scripts:
    python networksecurity/components/model_trainer.py
  3. Run tests (if available):
    python -m unittest discover

Example Usage

After starting the app, you can interact with the API (if implemented) or run scripts for training and evaluation. Logs and exceptions will be handled and stored as per the logging configuration.

Contribution

Feel free to fork the repository, create issues, or submit pull requests for improvements.

Author

Akshit Maheshwari

About

Network Security Model

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages