Skip to content

Commit c0a06d2

Browse files
authored
Merge pull request #1867 from CVEProject/dev
Updating Staging from Dev
2 parents b9fbf34 + a2b6860 commit c0a06d2

77 files changed

Lines changed: 5842 additions & 686 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,7 @@ commit-message.txt
107107
# configuration) and provide an example instead
108108
docker/.docker-env
109109

110+
**/export.xlsx
111+
**/poc_admin_report.csv
112+
**/~$*.xlsx
113+
src/scripts/importDb.sh

api-docs/openapi.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.2",
33
"info": {
4-
"version": "2.8.0",
4+
"version": "2.8.1",
55
"title": "CVE Services API",
66
"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.2 CVE Record format. Details of the JSON 5.2 schema are located <a href='https://github.com/CVEProject/cve-schema/releases/tag/v5.2.0' target='_blank'>here</a>.</p> <a href='https://cveform.mitre.org/' class='link' target='_blank'>Contact the CVE Services team</a>",
77
"contact": {
@@ -11,7 +11,7 @@
1111
},
1212
"servers": [
1313
{
14-
"url": "urlplaceholder"
14+
"url": "https://cveawg-dev.mitre.org/api"
1515
}
1616
],
1717
"paths": {
@@ -2318,6 +2318,30 @@
23182318
},
23192319
"description": "The shortname or UUID of the registry organization"
23202320
},
2321+
{
2322+
"name": "expand",
2323+
"in": "query",
2324+
"description": "Optional expanded related data. Accepted value: users.",
2325+
"required": false,
2326+
"schema": {
2327+
"type": "object",
2328+
"properties": {
2329+
"type": {
2330+
"type": "string",
2331+
"example": "string"
2332+
},
2333+
"enum": {
2334+
"type": "array",
2335+
"example": [
2336+
"users"
2337+
],
2338+
"items": {
2339+
"type": "string"
2340+
}
2341+
}
2342+
}
2343+
}
2344+
},
23212345
{
23222346
"$ref": "#/components/parameters/apiEntityHeader"
23232347
},

package-lock.json

Lines changed: 300 additions & 185 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cve-services",
33
"author": "Automation Working Group",
4-
"version": "2.8.0",
4+
"version": "2.8.1",
55
"license": "(CC0)",
66
"devDependencies": {
77
"@faker-js/faker": "^7.6.0",
@@ -23,7 +23,8 @@
2323
"mocha": "^10.8.2",
2424
"nyc": "^15.1.0",
2525
"sinon": "^15.0.4",
26-
"standard": "^16.0.3"
26+
"standard": "^16.0.3",
27+
"xlsx": "^0.18.5"
2728
},
2829
"dependencies": {
2930
"ajv": "^8.6.2",
@@ -34,7 +35,7 @@
3435
"cors": "^2.8.5",
3536
"crypto-random-string": "^3.3.1",
3637
"dotenv": "^5.0.1",
37-
"express": "^4.22.1",
38+
"express": "^4.22.2",
3839
"express-jsonschema": "^1.1.6",
3940
"express-rate-limit": "^6.5.2",
4041
"express-validator": "^6.14.2",
@@ -81,6 +82,7 @@
8182
"lint:test-utils": "node node_modules/eslint/bin/eslint.js test-utils/ --fix",
8283
"populate:dev": "NODE_ENV=development node-dev src/scripts/populate.js",
8384
"migrate:dev": "NODE_ENV=development MONGO_CONN_STRING=mongodb://localhost:27017 MONGO_DB_NAME=cve_dev node-dev src/scripts/migrate.js",
85+
"migrate:dev:monday": "NODE_ENV=development MONGO_CONN_STRING=mongodb://localhost:27017 MONGO_DB_NAME=cve_dev node-dev src/scripts/MondayMigrate.js",
8486
"migrate:test-black-box": "NODE_ENV=development MONGO_CONN_STRING=mongodb://docdb:27017 MONGO_DB_NAME=cve_dev node-dev src/scripts/migrate.js",
8587
"migrate:test": "NODE_ENV=test MONGO_CONN_STRING=mongodb://localhost:27017 MONGO_DB_NAME=cve_test node-dev src/scripts/migrate.js",
8688
"populate:stage": "NODE_ENV=staging node src/scripts/populate.js",

schemas/registry-org/BaseOrg.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"ROOT"
4444
]
4545
},
46-
"partnerRoleType": {
46+
"partnerRoleTypeValue": {
4747
"description": "The type of role a partner holds",
4848
"type": "string",
4949
"enum": [
@@ -57,6 +57,14 @@
5757
"Researcher",
5858
"Vendor"
5959
]
60+
},
61+
"partnerRoleType": {
62+
"description": "The types of roles a partner holds",
63+
"type": "array",
64+
"uniqueItems": true,
65+
"items": {
66+
"$ref": "#/definitions/partnerRoleTypeValue"
67+
}
6068
}
6169
},
6270
"properties": {

schemas/registry-org/create-registry-org-request.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,23 @@
139139
"description": "Indicates if part of the CNA discussion list"
140140
},
141141
"partner_role_type": {
142-
"type": "string",
143-
"enum": [
144-
"",
145-
"Bug Bounty Provider",
146-
"CERT",
147-
"Consortium",
148-
"Hosted Service",
149-
"N/A",
150-
"Open Source",
151-
"Researcher",
152-
"Vendor"
153-
],
154-
"description": "The type of role a partner holds"
142+
"type": "array",
143+
"items": {
144+
"type": "string",
145+
"enum": [
146+
"",
147+
"Bug Bounty Provider",
148+
"CERT",
149+
"Consortium",
150+
"Hosted Service",
151+
"N/A",
152+
"Open Source",
153+
"Researcher",
154+
"Vendor"
155+
]
156+
},
157+
"uniqueItems": true,
158+
"description": "The types of roles a partner holds"
155159
},
156160
"partner_number": {
157161
"type": "string",

schemas/registry-org/get-registry-org-response.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@
109109
},
110110
"phone": {
111111
"type": "string"
112+
},
113+
"additional_contacts": {
114+
"type": "array",
115+
"items": {
116+
"type": "string"
117+
},
118+
"description": "UUIDs of additional contact users"
112119
}
113120
},
114121
"additionalProperties": false
@@ -220,6 +227,49 @@
220227
}
221228
},
222229
"description": "List of conversation messages associated with the organization"
230+
},
231+
"_userMap": {
232+
"type": "object",
233+
"additionalProperties": {
234+
"type": "object",
235+
"properties": {
236+
"username": {
237+
"type": "string",
238+
"description": "User's identifier or username"
239+
},
240+
"name": {
241+
"type": "object",
242+
"properties": {
243+
"first": {
244+
"type": "string",
245+
"description": "User's first name"
246+
},
247+
"last": {
248+
"type": "string",
249+
"description": "User's last name"
250+
},
251+
"middle": {
252+
"type": "string",
253+
"description": "User's middle name"
254+
},
255+
"suffix": {
256+
"type": "string",
257+
"description": "User's name suffix"
258+
}
259+
}
260+
},
261+
"org": {
262+
"type": "object",
263+
"properties": {
264+
"short_name": {
265+
"type": "string",
266+
"description": "Short name of the organization associated with the user"
267+
}
268+
}
269+
}
270+
}
271+
},
272+
"description": "Map of expanded user UUIDs to display metadata, included when expand=users is requested"
223273
}
224274
}
225275
}

schemas/registry-org/update-registry-org-request.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,23 @@
155155
"description": "Indicates if part of the CNA discussion list"
156156
},
157157
"partner_role_type": {
158-
"type": "string",
159-
"enum": [
160-
"",
161-
"Bug Bounty Provider",
162-
"CERT",
163-
"Consortium",
164-
"Hosted Service",
165-
"N/A",
166-
"Open Source",
167-
"Researcher",
168-
"Vendor"
169-
],
170-
"description": "The type of role a partner holds"
158+
"type": "array",
159+
"items": {
160+
"type": "string",
161+
"enum": [
162+
"",
163+
"Bug Bounty Provider",
164+
"CERT",
165+
"Consortium",
166+
"Hosted Service",
167+
"N/A",
168+
"Open Source",
169+
"Researcher",
170+
"Vendor"
171+
]
172+
},
173+
"uniqueItems": true,
174+
"description": "The types of roles a partner holds"
171175
},
172176
"partner_number": {
173177
"type": "string",

schemas/registry-user/BaseUser.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@
101101
"required": [
102102
"username"
103103
]
104-
}
104+
}

schemas/registry-user/create-registry-user-request.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@
3131
},
3232
"required": ["first", "last"]
3333
},
34-
"org_affiliations": {
35-
"type": "array",
36-
"items": {
37-
"type": "string"
38-
},
39-
"description": "UUIDs of organizations the user is affiliated with"
40-
},
41-
"cve_program_org_membership": {
42-
"type": "array",
43-
"items": {
44-
"type": "string"
45-
},
46-
"description": "UUIDs of CVE program organizations the user is a member of"
47-
},
4834
"authority": {
4935
"type": "object",
5036
"properties": {

0 commit comments

Comments
 (0)