Skip to content

Commit

Permalink
Merge pull request #918 from CVEProject/dev
Browse files Browse the repository at this point in the history
Update INT from DEV
  • Loading branch information
jdaigneau5 authored Nov 14, 2022
2 parents 6edd0d6 + 4eab157 commit 40af349
Show file tree
Hide file tree
Showing 20 changed files with 5,445 additions and 1,834 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ API documentation is generated using [swagger-autogen](https://github.com/daviba

To ensure you are using the correct API specification the following endpoints can be used:
- [Test Instance](https://cveawg-test.mitre.org/api-docs/)
- [Production](https://cveawg.mitre.org/api-docs/openapi.json)
- [Production](https://cveawg.mitre.org/api-docs/)

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

Expand Down
11 changes: 5 additions & 6 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
"info": {
"version": "2.1.0",
"title": "CVE Services API",
"description": "The CVE Services API supports automation tooling for the CVE Program. Credentials are required for most service endpoints. Representatives of <a href='https://www.cve.org/ProgramOrganization/CNAs'>CVE Numbering Authorities (CNAs)</a> should use one of the methods below to obtain credentials: <ul><li>If your organization already has an Organizational Administrator (OA) account for the CVE Services, ask your admin for credentials</li> <li>Contact your Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/Google'>Google</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/INCIBE'>INCIBE</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/jpcert'>JPCERT/CC</a>, or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/redhat'>Red Hat</a>) or Top-Level Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/icscert'>CISA ICS</a> or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/mitre'>MITRE</a>) to request credentials </ul>",
"description": "The CVE Services API supports automation tooling for the CVE Program. Credentials are required for most service endpoints. Representatives of <a href='https://www.cve.org/ProgramOrganization/CNAs'>CVE Numbering Authorities (CNAs)</a> should use one of the methods below to obtain credentials: <ul><li>If your organization already has an Organizational Administrator (OA) account for the CVE Services, ask your admin for credentials</li> <li>Contact your Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/Google'>Google</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/INCIBE'>INCIBE</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/jpcert'>JPCERT/CC</a>, or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/redhat'>Red Hat</a>) or Top-Level Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/icscert'>CISA ICS</a> or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/mitre'>MITRE</a>) to request credentials </ul> <p>CVE data is to be in the JSON 5.0 CVE Record format. Details of the JSON 5.0 schema are located <a href='https://github.com/CVEProject/cve-schema/tree/master/schema/v5.0' target='_blank'>here</a>.</p> <a href='https://cveform.mitre.org/' class='link' target='_blank'>Contact the CVE Services team</a>",
"contact": {
"name": "CVE Services",
"url": "https://cveawg-dev.mitre.org/api",
"email": "[email protected]"
"name": "CVE Services Overview",
"url": "https://cveproject.github.io/automation-cve-services#services-overview"
}
},
"servers": [
Expand Down Expand Up @@ -2804,7 +2803,7 @@
"tags": [
"string"
],
"url": "https://cveawg-dev.mitre.org/api"
"url": "string"
}
]
}
Expand Down Expand Up @@ -2907,4 +2906,4 @@
}
}
}
}
}
6 changes: 6 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,9 @@ See the [API documentation](https://github.com/CVEProject/cve-services#api-docum
## Mongo DB

The `docker-compose.yml` file exposes the default Mongo port to the host: `localhost:27017`. You can connect using any Mongo viewer such as [Mongo Express](https://github.com/mongo-express/mongo-express) or [Compass](https://www.mongodb.com/try/download/compass) on the host.

## Running unit tests

You can run unit tests using the docker image by running the following command:

`docker exec -it cveawg npm run test`
7 changes: 7 additions & 0 deletions docker/default.json-docker
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
"host": "docdb",
"port": 27017
},
"prod-staging": {
"username": null,
"password": null,
"database": "cve_prd",
"host": "docdb",
"port": 27017
},
"production": {
"username": null,
"password": null,
Expand Down
2 changes: 2 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ elif [[ "$NODE_ENV" == "staging" ]]; then
npm run start:stage
elif [[ "$NODE_ENV" == "integration" ]]; then
npm run start:int
elif [[ "$NODE_ENV" == "prod-staging" ]]; then
npm run start:prdstg
elif [[ "$NODE_ENV" == "production" ]]; then
npm run start:prd
else
Expand Down
Loading

0 comments on commit 40af349

Please sign in to comment.