GithubHelp home page GithubHelp logo

mrfoxyfoxy / mycves Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 118 KB

myCVEs sends you regularly new and updated CVEs for your configured products.

License: GNU General Public License v3.0

Python 70.59% HTML 28.66% Dockerfile 0.75%
cve nist-database nist-api cve-api python incident-response vulnerability vulnerability-management asyncio docker

mycves's Introduction

myCVEs

myCVEs sends you regularly new and updated CVEs for your configured products. CVEs are fetched from the NIST CVE API on https://services.nvd.nist.gov/rest/json/cves/1.0/ and filtered according to the jobs configured in your jobs directory.

Requirements:

  • Python 3.8 (only tested with 3.9) either on Windows oder Linux.
  • A reachable mailserver or an email-Account (e.g. gmail with application password) for sending the emails
  • On Linux: cron installed

Alternative:

  • Docker installed (only tested with Linux)

Installation:

Linux

cd /opt    
git clone https://github.com/mrfoxyfoxy/myCVEs.git	(alternatively you can download the repo manually and paste it to the directory)
cd /opt/myCVEs
python3 -m venv .venv
source .venv/bin/activate
pip install -r src/requirements.txt 
deactivate
echo "0 * * * * root /opt/myCVEs/.venv/bin/python3 /opt/myCVEs/src/main.py" >> /etc/crontab && echo "" >> /etc/crontab

Windows

open a powershell window

cd C:\Program Files    
git clone https://github.com/mrfoxyfoxy/myCVEs.git (alternatively you can download the repo manually and paste it to the directory)
cd C:\Program Files\myCVEs 
python3 -m venv .venv
.venv/Scripts/activate
pip install -r src/requirements.txt 
.venv/Scripts/deactivate

Configuring the Task (alternatively you can configure it manually in the task scheduler):

$action = New-ScheduledTaskAction -Execute 'C:\Program Files\myCVEs\.venv\Scripts\Python.exe' -Argument 'C:\Program Files\myCVEs\src.main.py'
$trigger =  New-ScheduledTaskTrigger -Daily -At 0am
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "myCVEs" -Description "get new and updated CVEs"
$Task.Triggers.Repetition.Duration = "P1D"
$Task.Triggers.Repetition.Interval = "PT1H" 
$Task = Get-ScheduledTask -TaskName "myCVEs" 
$Task | Set-ScheduledTask -User "[your_windows_username]"

Docker

cd /opt    
git clone https://github.com/mrfoxyfoxy/myCVEs.git	
cd /opt/myCVEs
docker pull python:3.9-slim-bullseye
docker build . -t mycves:0.1.0
docker-compose up -d

Configuration

  1. Configure settings.yaml and .secrets.yaml according to the provided comments.
  2. Create your jobs according to the sample_job_yaml and remove the sample_job.yaml from the jobs folder. You should only provide one vendor per job but you can provide as many producty for the vendor as you want. One configuration file may contain multiple jobs. To get better search results you could look for your products at the CPE dictionary https://nvd.nist.gov/products/cpe.

mycves's People

Contributors

mrfoxyfoxy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

mycves's Issues

src folder missing

When I am trying to build this container image, it will show me ./src folder missing cause the image build fail. Could you please help to upload the src folder and files ? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.