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.
- โ 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
โโโ 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
git clone https://github.com/010011110010110101011010/CVE-Mangement-Tool.git
cd CVE-Mangement-Tool/Web
-
Open Terminal: Launch your terminal.
-
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.
-
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.
-
Open Command Prompt or PowerShell:
- Command Prompt: Launch Command Prompt (cmd).
- PowerShell: Launch PowerShell.
-
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.
-
-
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.
-
Open Terminal: Launch your terminal.
-
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.
-
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.
-
Open Command Prompt or PowerShell:
- Command Prompt: Launch Command Prompt (cmd).
- PowerShell: Launch PowerShell.
-
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.
-
-
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.
pip install --no-cache-dir -r requirements.txt
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'CV',
'USER': 'XXX',
'PASSWORD': 'XXX',
'HOST': 'XXX',
'PORT': 'XXX',
}
}
python manage.py migrate
python manage.py runserver
-
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. -
Software Management
Navigate to/manage-software/
for a full list of software.
Use the Create, Update, Delete options for software records. -
Paginated View
Navigate to the paginated list of CVEs and Software using the dropdown.
Component | Technology |
---|---|
Frontend | HTML, CSS, JavaScript |
Backend | Django, Python |
Database | MySQL |
Version Control | Git |
๐ 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.
This project is licensed under the MIT License.
### CVE List