Skip to content

This project is a Comprehensive Vulnerability Management and Software Catalog system Dashboard.

License

Notifications You must be signed in to change notification settings

010011110010110101011010/CVE-Mangement-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ InsecTrace ๐ŸŒ

alt text

๐Ÿš€ A Django CVE & Software Management System ๐ŸŒ

Django Python MySQL License

๐Ÿ“– Project Overview

This project is a Comprehensive Vulnerability Management and Software Catalog system, built with Django. It helps to track Common Vulnerabilities and Exposures (CVEs) and manage software with ease. The system enables efficient data handling, pagination, database querying, and URL parsing.


๐ŸŒŸ Features

  • โœ… Manage CVE Records (Add, Update, Delete)
  • โœ… Track and Map Software Data
  • โœ… Fetch, Parse, and Store Bulletin URLs
  • โœ… HTML Parsing using BeautifulSoup
  • โœ… HTTP Requests with Requests Library
  • โœ… Paginated Lists for User-Friendly Views
  • โœ… URL Handling and Dynamic Redirects

๐Ÿ“‚ Project Structure


โ”œโ”€โ”€ Web/
โ”‚   โ”œโ”€โ”€ manage.py          # The Django File To Start The Server Project
โ”‚   โ”œโ”€โ”€ InSecTrace/
โ”‚   โ”‚  โ”œโ”€โ”€ settings.py # Where You Can Edit all your project background settings
โ”‚   โ”‚  โ””โ”€โ”€ ...
โ”‚   โ””โ”€โ”€ myapp/
โ”‚      โ”œโ”€โ”€ admin.py         # CVE and Software Models
โ”‚      โ”œโ”€โ”€ models.py        # CVE and Software Models
โ”‚      โ”œโ”€โ”€ views.py         # Core View Functions
โ”‚      โ”œโ”€โ”€ urls.py          # URL Routing
โ”‚      โ””โ”€โ”€ templates/
โ”‚          โ”œโ”€โ”€ index.html    # Main Presentation Template
โ”‚          โ”œโ”€โ”€ dashboard.html # Dashboard with CVE and Software
โ”‚          โ””โ”€โ”€ ...
โ”œโ”€โ”€ requirements.txt     # Dependencies
โ””โ”€โ”€ README.md            # Project Overview

โš™๏ธ Installation Guide

1. Clone the Repository

git clone https://github.com/010011110010110101011010/CVE-Mangement-Tool.git
cd CVE-Mangement-Tool/Web

2. Set Up Virtual Environment

Setting Up Environment Variables For The Secret Key of the Django Project

For Linux:

  1. Open Terminal: Launch your terminal.

  2. Set Environment Variable Temporarily: To set an environment variable for the current session, use the export command:

    export SECRET_KEY=$(django-admin shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())")

    This variable will be available until you close the terminal session.

  3. Set Environment Variable Permanently: To set it permanently, add the export command to your shell profile file (~/.bashrc, ~/.bash_profile, or ~/.zshrc, depending on your shell):

    echo "export SECRET_KEY=$(django-admin shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())")" >> ~/.bashrc

    After adding it to the profile file, run the following command to apply the changes:

    source ~/.bashrc

    If you use zsh, replace ~/.bashrc with ~/.zshrc.

Windows:

  1. Open Command Prompt or PowerShell:

    • Command Prompt: Launch Command Prompt (cmd).
    • PowerShell: Launch PowerShell.
  2. Set Environment Variable Temporarily:

    • Command Prompt:

      set SECRET_KEY = django-admin shell -c "from django.core.management.utils import get_random_secret_key; get_random_secret_key()"

      This variable will be available only for the current session.

    • PowerShell:

      $env: SECRET_KEY = django-admin shell -c "from django.core.management.utils import get_random_secret_key; get_random_secret_key()

      This will also be available only for the current session.

  3. Set Environment Variable Permanently:

    • Command Prompt: Open the System Properties dialog (System Properties > Advanced > Environment Variables) and add a new variable under either User variables or System variables.

      • Variable name: SECRET_KEY
      • Variable Command: django-admin shell -c "from django.core.management.utils import get_random_secret_key; get_random_secret_key()
    • PowerShell: You can set a permanent environment variable using the [System.Environment]::SetEnvironmentVariable method:

      [System.Environment]::SetEnvironmentVariable('SECRET_KEY', 'django-admin shell -c "from django.core.management.utils import get_random_secret_key; get_random_secret_key()', [System.EnvironmentVariableTarget]::User)

      This command sets the variable for the current user. If you want to set it for all users, replace User with Machine.

Accessing Environment Variables in Django:

In your Django settings or other parts of your application, you can access the environment variable like this:

import os

# Retrieve the environment variable with a default value
SECRET_KEY = os.environ.get('SECRET_KEY', 'default_value')

Replace 'default_value' with whatever default value you want to use if the environment variable is not set. This code ensures your application can handle the absence of the variable gracefully.

Setting Up Environment Variables For Db Password

Linux:

  1. Open Terminal: Launch your terminal.

  2. Set Environment Variable Temporarily: To set an environment variable for the current session, use the export command:

    export EXAPWD='your_password_here'

    This variable will be available until you close the terminal session.

  3. Set Environment Variable Permanently: To set it permanently, add the export command to your shell profile file (~/.bashrc, ~/.bash_profile, or ~/.zshrc, depending on your shell):

    echo "export EXAPWD='your_password_here'" >> ~/.bashrc

    After adding it to the profile file, run the following command to apply the changes:

    source ~/.bashrc

    If you use zsh, replace ~/.bashrc with ~/.zshrc.

Windows:

  1. Open Command Prompt or PowerShell:

    • Command Prompt: Launch Command Prompt (cmd).
    • PowerShell: Launch PowerShell.
  2. Set Environment Variable Temporarily:

    • Command Prompt:

      set EXAPWD=your_password_here

      This variable will be available only for the current session.

    • PowerShell:

      $env:EXAPWD = "your_password_here"

      This will also be available only for the current session.

  3. Set Environment Variable Permanently:

    • Command Prompt: Open the System Properties dialog (System Properties > Advanced > Environment Variables) and add a new variable under either User variables or System variables.

      • Variable name: EXAPWD
      • Variable value: your_password_here
    • PowerShell: You can set a permanent environment variable using the [System.Environment]::SetEnvironmentVariable method:

      [System.Environment]::SetEnvironmentVariable('EXAPWD', 'your_password_here', [System.EnvironmentVariableTarget]::User)

      This command sets the variable for the current user. If you want to set it for all users, replace User with Machine.

Accessing Environment Variables in Django:

In your Django settings or other parts of your application, you can access the environment variable like this:

import os

# Retrieve the environment variable with a default value
exapwd = os.environ.get('EXAPWD', 'default_value')

Replace 'default_value' with whatever default value you want to use if the environment variable is not set. This code ensures your application can handle the absence of the variable gracefully.

3. Install Dependencies

pip install --no-cache-dir -r requirements.txt

4. Set Up MySQL Database

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'CV',
        'USER': 'XXX',
        'PASSWORD': 'XXX',
        'HOST': 'XXX',
        'PORT': 'XXX',
    }
}

5. Apply Migrations

python manage.py migrate

6. Run the Server

python manage.py runserver

๐Ÿ›  Usage Guide

  1. CVE Management
    Go to /dashboard to acces the dashboard . To view all CVEs go to /First_View .
    Add, Update, or Delete CVEs from the list.
  2. Software Management
    Navigate to /manage-software/ for a full list of software.
    Use the Create, Update, Delete options for software records.
  3. Paginated View
    Navigate to the paginated list of CVEs and Software using the dropdown.

๐Ÿ’ป Tech Stack

Component Technology
Frontend HTML, CSS, JavaScript
Backend Django, Python
Database MySQL
Version Control Git

๐Ÿ“… Future Enhancements

๐ŸŒ Integrate RESTful API for external CVE updates. ๐Ÿ” Add search and filter options for CVEs. ๐Ÿ“Š Integrate charts to visualize CVE statistics. ๐Ÿ” Implement user authentication for managing records.

๐Ÿ“ License

This project is licensed under the MIT License.

๐ŸŽฏ Screenshots

๐Ÿ–ฅ๏ธ Presentation View

Screenshot 2024-09-17 at 18 23 15

Dashboard View

1 2 ### CVE List 3

CVE OS Details

4

CVE Item Details

5

ยฎ Project By 010011110010110101011010 ยฎ