This is a rails/postgres application that will serve json data from the following data sources:
- Cves
- Cpes
- CNA security advisories
- GHSA Github security advisories
- Github repositories that track public exploits for cves.
- A list of github usernames github API data.
app | ||
bin | ||
config | ||
db | ||
lib | ||
log | ||
public | ||
storage | ||
test | ||
tmp | ||
vendor | ||
.gitignore | ||
.ruby-version | ||
config.ru | ||
docker-compose.yml | ||
Dockerfile | ||
entrypoint.sh | ||
Gemfile | ||
Gemfile.lock | ||
package.json | ||
Rakefile | ||
README.md |
data_importer
Import common security data such as CVE, CPE, and Security Advisories from various CNAs into a rails app with a postgresql db backend.
Supported data models:
Cve
data from cve_list mitre.Cpe
data from nvd 2.2 format.GithubPoc
data from nomi-sec.InthewildCveExploit
data from inthewild.io exploited feed.
Initial Setup
Build container
docker-compose build
Database creation and seeding initial data
docker-compose run web rake db:create
docker-compose run web rake db:migrate
docker-compose run web rake db:seed
Launch Pry console
docker-compose run web rails console
HTTP API
For now unauthenticated api over localhost:3000 until I put in some basic token auth. All response data is json rendered.
Cves
get "/cves", to: "cves#index"
get "/cves/:cve_id", to: "cves#show"
get "/cves/years/:year", to: "cves#show_year"
Cpes
get "/cpes", to: "cpes#index"
get "/cpes/:id", to: "cpes#show"
GithubPocs
get "/github_pocs", to: "github_pocs#index"
get "/github_pocs/:id", to: "github_pocs#show"
get "/github_pocs/cve/:cve_id", to: "github_pocs#show_for_cve"
InthewildCveExploits
get "/inthewild_cve_exploits", to: "inthewild_cve_exploits#index"
get "/inthewild_cve_exploits/:cve_id", to: "inthewild_cve_exploits#show"