Giter VIP home page Giter VIP logo

cve-services's Introduction

CVE-API

CodeQL Gitter

Table of contents

Project

This repository is the host to the development effort whose objective is to create automated services to further enable the CVE community in their mission.

There are many ways one can assist this project in reaching this objective.

OSS Contributor

As a developer that wants to help contribute code to the project, getting started can be as fast as choosing an issue on our board and joining our Gitter chat to talk with developers about any questions that may come up while getting oriented with the project.

Working Groups

The CVE project operates as several focused working groups.

The Automation Working Group focuses on technical implementation and code contribution. The group meets once a week but the meetings are not mandatory and the mailing list helps to stay in the loop on development progress as meeting notes and agendas are distributed on it. It is not mandatory to become a member of the AWG in order to contribute code.

The Quality Working Group focuses on identifying areas where CVE content, rules, guidelines, and best practices must improve to better support stakeholder use cases. This is a good place to start for sharing desired functionality with the CVE project.

The Strategic Planning Working Group focuses on the long-term strategy (1-5 years) and goals of the CVE Program; works closely with the CVE Board to determine goals and objectives and will act to achieve them. If the desired functionality falls within the SPWG's range, it might be better to become a part of this working group and assist in the future of CVE.

Contributing

Whether it be submitting an issue for a feature request or a bug report, fixing a typo on some documentation, or assisting with an issue on our GitHub board, we enthusiastically welcome any contribution. If becoming a contributor to the codebase is your goal, please read our contributing guide to get started!

Security

Reporting a Vulnerability

Please do not put vulnerability information in a GitHub issue. Please consult our SECURITY.md for specific instructions on reporting a vulnerability that exists in the CVE Services.

Development

Technologies

This project uses or depends on software from

Style Guidelines

This project uses the following Style Guidelines

Directory layout

Top Level Directory

.
├── src                     # Source files (This is where the API resides)
├── test                    # Automated tests (This is where the API tests reside)
├── LICENSE
└── README.md               

Src Directory

.
├── ...
├── src                     # Source files (This is where the API resides)
│   ├── controller/         # All API logic resides here.
│   ├── model/              # All Mongoose Schemas, models, and database logic.
│   ├── middleware/         # Authentication middleware resides inside this folder. 
│   ├── routes.config.js    # This is where routes get created and get tied back to their specific controller. 
│   └── index.js            # Where everything begins.
└── ...

Setup

Using Docker

Before trying the AWG docker app, verify your docker setup is working properly using the "Hello World" example container with the following command:

docker run hello-world

You should see a message saying "Hello from Docker!" upon success.

Then refer to the docker README found in the repo here: https://github.com/CVEProject/cve-services/blob/dev/docker/README.md

Local Development

  1. Install required node modules

This assumes the latest node and npm are installed.

cd cve-services
npm install
  1. Setup and start MongoDB locally

Install MongoDB locally

Download MongoDB Compass (MongoDB GUI)

Create a cve_dev database in Compass. The collections will be automatically created when the API starts storing documents.

You can populate the database with test data using:

npm run populate:dev
  1. Start the node application

In order to start a dev environment:

npm run start:dev

Api Documentation

API documentation is generated using swagger-autogen which ensures that we keep the API specification up to date with any major changes to API routes. Extra information for each API route is defined as a comment in the index.js files under the respective controller and all request and response schemas are stored under the schemas folder served up by schemas.controller.

To ensure you are using the correct API specification the following endpoints can be used:

Note: The specification file stored in GitHub will only be correct for that branch there could be differences between branches and production.

If you are developer and want to test changes to the API specification you can generate a specification in one of two ways:

  1. Ideal

When you start your local development server using npm run start:dev the specification file will be generated. Subsequent changes you will need to reload the server.

If you are updating files in the schemas folder you will need to reload the server to see the changes due to the limitations of the require method.

  1. Manual

You can use npm run swagger-autogen which will generate a new specification file. However, if you run npm run start:dev this will generate a specification file so you may need to adjust something if you need to test a specific thing.

Unit Testing

This project uses the following for unit testing

In order to run the unit tests:

npm run start:test

cve-services's People

Contributors

athu-tran avatar colbyprior avatar cpaynerogers avatar craigk5n avatar cristina479 avatar dependabot[bot] avatar giansantos avatar jdaigneau5 avatar kernelsmith avatar madcatter24 avatar mattrbianchi avatar mprpic avatar rotsen91 avatar sethers avatar shaneficorilli avatar slubar avatar snyk-bot avatar spant-mitre avatar wizedkyle avatar

Watchers

 avatar  avatar

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.