Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beyarz/cve-api
Unofficial api for cve.mitre.org
https://github.com/beyarz/cve-api
api cve cve-search dockerfile parse real-time ruby self-hosted selfhosted sinatra
Last synced: about 2 months ago
JSON representation
Unofficial api for cve.mitre.org
- Host: GitHub
- URL: https://github.com/beyarz/cve-api
- Owner: Beyarz
- Created: 2020-02-10T20:30:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-28T13:37:05.000Z (over 3 years ago)
- Last Synced: 2024-10-10T04:08:06.757Z (2 months ago)
- Topics: api, cve, cve-search, dockerfile, parse, real-time, ruby, self-hosted, selfhosted, sinatra
- Language: Ruby
- Homepage:
- Size: 3.84 MB
- Stars: 41
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![name](assets/name.png)
Parse & filter the latest CVEs from https://cve.mitre.org
## Docs
### Usage
`http://localhost:4000/cve?target=KEYWORD`
The year parameter is optional.\
`http://localhost:4000/cve?target=KEYWORD&year=YEAR`#### Examples
`http://localhost:4000/cve?target=ruby%20on%20rails`\
![terminal](assets/terminal.png)
![browser](assets/browser.png)`http://localhost:4000/cve?target=ruby%20on%20rails&year=2020`
If you want to parse the latest year, use the "latest" keyword.\
`http://localhost:4000/cve?target=ruby%20on%20rails&year=latest`## Getting started
- Download the project
- `bundle install`
- `ruby rest.rb`## Requirements
- [Ruby](https://www.ruby-lang.org/en/)
- [Docker](https://www.docker.com) (Optional, only required if you want to run through a container.)### Environment
You can switch between prod & dev at `config/environment.rb`\
You need to create one yourself, an example can be found [here](config/environment-example.rb).### Healthcheck
The url will return a status code of 200 which means the api is healthy.\
If 200 is not shown then you should assume there is something wrong.\
`http://localhost:4000/status`## Manage image
### Access
You can access the api via \
You should be able to view the index page from the url.
![index](assets/index.png)### Build image
`docker build . -t cve-api`
### Run image
`docker run -p 4000:4000 -d cve-api`
### Get id
`docker ps`
### Stop image
`docker stop ID`
#### Remove image
`docker rmi cve-api`