diff --git a/api-docs/openapi.json b/api-docs/openapi.json index b052bbe8a..7b339c7a5 100644 --- a/api-docs/openapi.json +++ b/api-docs/openapi.json @@ -1,3480 +1,3480 @@ { - "openapi": "3.0.2", - "info": { - "version": "2.3.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 CVE Numbering Authorities (CNAs) should use one of the methods below to obtain credentials:

CVE data is to be in the JSON 5.1 CVE Record format. Details of the JSON 5.1 schema are located here.

Contact the CVE Services team", - "contact": { - "name": "CVE Services Overview", - "url": "https://cveproject.github.io/automation-cve-services#services-overview" - } - }, - "servers": [ - { - "url": "https://cveawg-dev.mitre.org/api" - } - ], - "paths": { - "/cve-id": { - "get": { - "tags": [ - "CVE ID" - ], - "summary": "Retrieves information about CVE IDs after applying the query parameters as filters (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves filtered CVE IDs owned by the user's organization

Secretariat: Retrieves filtered CVE IDs owned by any organization

", - "operationId": "cveIdGetFiltered", - "parameters": [ - { - "$ref": "#/components/parameters/cveIdGetFilteredState" - }, - { - "$ref": "#/components/parameters/cveIdGetFilteredCveIdYear" - }, - { - "$ref": "#/components/parameters/cveIdGetFilteredTimeReservedLt" - }, - { - "$ref": "#/components/parameters/cveIdGetFilteredTimeReservedGt" - }, - { - "$ref": "#/components/parameters/cveIdGetFilteredTimeModifiedLt" - }, - { - "$ref": "#/components/parameters/cveIdGetFilteredTimeModifiedGt" - }, - { - "$ref": "#/components/parameters/pageQuery" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "A filtered list of information about CVE IDs owned by the organization, along with pagination fields if results span multiple pages of data", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve-id/list-cve-ids-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } - } - }, - "post": { - "tags": [ - "CVE ID" - ], - "summary": "Reserves CVE IDs for the organization provided in the short_name query parameter (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Reserves CVE IDs for the CNA

Secretariat: Reserves CVE IDs for any organization

", - "operationId": "cveIdReserve", - "parameters": [ - { - "$ref": "#/components/parameters/amount" - }, - { - "$ref": "#/components/parameters/batch_type" - }, - { - "$ref": "#/components/parameters/cve_year" - }, - { - "$ref": "#/components/parameters/short_name" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "A list of the newly reserved CVE IDs", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve-id/create-cve-ids-response.json" - } - } - } - }, - "206": { - "description": "A partial list of the CVE IDs the IDR service managed to reserve before encountering a case where no more CVE IDs could be reserved", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve-id/create-cve-ids-partial-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } + "openapi": "3.0.2", + "info": { + "version": "2.3.1", + "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 CVE Numbering Authorities (CNAs) should use one of the methods below to obtain credentials:

CVE data is to be in the JSON 5.1 CVE Record format. Details of the JSON 5.1 schema are located here.

Contact the CVE Services team", + "contact": { + "name": "CVE Services Overview", + "url": "https://cveproject.github.io/automation-cve-services#services-overview" } - } }, - "/cve-id/{id}": { - "get": { - "tags": [ - "CVE ID" - ], - "summary": "Retrieves information about the specified CVE ID (accessible to all users)", - "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

Regular, CNA & Admin Users: Retrieves full information about a CVE ID owned by their organization; partial information about a CVE ID owned by other organizations

Unauthenticated Users: Retrieves partial information about a CVE ID

Secretariat: Retrieves full information about a CVE ID owned by any organization

Note - The owning organization of RESERVED CVE IDs is redacted for all users other than those in the owning organization or Secretariat

", - "operationId": "cveIdGetSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The id of the CVE ID information to retrieve" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The requested CVE ID information is returned", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve-id/get-cve-id-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } - } - }, - "put": { - "tags": [ - "CVE ID" - ], - "summary": "Updates information related to the specified CVE ID (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates information related to a CVE ID owned by the CNA

Secretariat: Updates a CVE ID owned by any organization

", - "operationId": "cveIdUpdateSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The id of the CVE ID to update" - }, - { - "$ref": "#/components/parameters/org" - }, - { - "$ref": "#/components/parameters/state" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The updated CVE ID information is returned", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve-id/update-cve-id-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } - } - } - }, - "/cve-id-range/{year}": { - "post": { - "tags": [ - "CVE ID" - ], - "summary": "Creates a CVE-ID-Range for the specified year (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates a CVE-ID-Range for the specified year

", - "operationId": "cveIdRangeCreate", - "parameters": [ - { - "name": "year", - "in": "path", - "required": true, - "schema": { - "type": "integer" - }, - "description": "The year of the CVE-ID-Range" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The CVE-ID-Range was created" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } - } - } - }, - "/cve/{id}": { - "get": { - "tags": [ - "CVE Record" - ], - "summary": "Returns a CVE Record by CVE ID (accessible to all users)", - "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

All users: Retrieves the CVE Record specified

", - "operationId": "cveGetSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The CVE ID for the Record to be retrieved" - } - ], - "responses": { - "200": { - "description": "The requested CVE Record", - "content": { - "application/json": { - "schema": { - "oneOf": [ + "servers": [ + { + "url": "https://cveawg-dev.mitre.org/api" + } + ], + "paths": { + "/cve-id": { + "get": { + "tags": [ + "CVE ID" + ], + "summary": "Retrieves information about CVE IDs after applying the query parameters as filters (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves filtered CVE IDs owned by the user's organization

Secretariat: Retrieves filtered CVE IDs owned by any organization

", + "operationId": "cveIdGetFiltered", + "parameters": [ + { + "$ref": "#/components/parameters/cveIdGetFilteredState" + }, + { + "$ref": "#/components/parameters/cveIdGetFilteredCveIdYear" + }, + { + "$ref": "#/components/parameters/cveIdGetFilteredTimeReservedLt" + }, + { + "$ref": "#/components/parameters/cveIdGetFilteredTimeReservedGt" + }, + { + "$ref": "#/components/parameters/cveIdGetFilteredTimeModifiedLt" + }, + { + "$ref": "#/components/parameters/cveIdGetFilteredTimeModifiedGt" + }, + { + "$ref": "#/components/parameters/pageQuery" + }, { - "$ref": "../schemas/cve/get-cve-record-response.json" + "$ref": "#/components/parameters/apiEntityHeader" }, { - "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "A filtered list of information about CVE IDs owned by the organization, along with pagination fields if results span multiple pages of data", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve-id/list-cve-ids-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } } - ] - }, - "examples": { - "Published Record": { - "$ref": "#/components/examples/publishedRecord" - }, - "Rejected Record": { - "$ref": "#/components/examples/rejectedRecord" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" } - } - } - }, - "403": { - "description": "Forbidden", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "post": { + "tags": [ + "CVE ID" + ], + "summary": "Reserves CVE IDs for the organization provided in the short_name query parameter (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Reserves CVE IDs for the CNA

Secretariat: Reserves CVE IDs for any organization

", + "operationId": "cveIdReserve", + "parameters": [ + { + "$ref": "#/components/parameters/amount" + }, + { + "$ref": "#/components/parameters/batch_type" + }, + { + "$ref": "#/components/parameters/cve_year" + }, + { + "$ref": "#/components/parameters/short_name" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "A list of the newly reserved CVE IDs", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve-id/create-cve-ids-response.json" + } + } + } + }, + "206": { + "description": "A partial list of the CVE IDs the IDR service managed to reserve before encountering a case where no more CVE IDs could be reserved", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve-id/create-cve-ids-partial-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "500": { - "description": "Internal Server Error", - "headers": { - "RateLimit-Limit": { - "schema": { - "type": "integer" - }, - "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." - }, - "RateLimit-Policy": { - "schema": { - "type": "string" - }, - "description": "Indicates a service policy currently associated with the client. Its value is informative." - }, - "RateLimit-Remaining": { - "schema": { - "type": "integer" - }, - "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." - }, - "RateLimit-Reset": { - "schema": { - "type": "integer" - }, - "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/cve-id/{id}": { + "get": { + "tags": [ + "CVE ID" + ], + "summary": "Retrieves information about the specified CVE ID (accessible to all users)", + "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

Regular, CNA & Admin Users: Retrieves full information about a CVE ID owned by their organization; partial information about a CVE ID owned by other organizations

Unauthenticated Users: Retrieves partial information about a CVE ID

Secretariat: Retrieves full information about a CVE ID owned by any organization

Note - The owning organization of RESERVED CVE IDs is redacted for all users other than those in the owning organization or Secretariat

", + "operationId": "cveIdGetSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The id of the CVE ID information to retrieve" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The requested CVE ID information is returned", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve-id/get-cve-id-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } - } - } - } - }, - "post": { - "tags": [ - "CVE Record" - ], - "summary": "Creates a CVE Record from full CVE Record JSON for the specified ID (accessible to Secretariat.)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates a CVE Record for any organization

", - "operationId": "cveSubmit", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The CVE ID for the record being submitted" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The CVE Record created", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "put": { + "tags": [ + "CVE ID" + ], + "summary": "Updates information related to the specified CVE ID (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates information related to a CVE ID owned by the CNA

Secretariat: Updates a CVE ID owned by any organization

", + "operationId": "cveIdUpdateSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The id of the CVE ID to update" + }, + { + "$ref": "#/components/parameters/org" + }, + { + "$ref": "#/components/parameters/state" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The updated CVE ID information is returned", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve-id/update-cve-id-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-secretariat-request.json" - } - } - } - } - }, - "put": { - "tags": [ - "CVE Record" - ], - "summary": "Updates a CVE Record from full CVE Record JSON for the specified ID (accessible to Secretariat.)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Updates a CVE Record for any organization

", - "operationId": "cveUpdateSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The CVE ID for the record being updated" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The updated CVE Record", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/update-full-cve-record-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "/cve-id-range/{year}": { + "post": { + "tags": [ + "CVE ID" + ], + "summary": "Creates a CVE-ID-Range for the specified year (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates a CVE-ID-Range for the specified year

", + "operationId": "cveIdRangeCreate", + "parameters": [ + { + "name": "year", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "description": "The year of the CVE-ID-Range" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The CVE-ID-Range was created" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/cve/{id}": { + "get": { + "tags": [ + "CVE Record" + ], + "summary": "Returns a CVE Record by CVE ID (accessible to all users)", + "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

All users: Retrieves the CVE Record specified

", + "operationId": "cveGetSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the Record to be retrieved" + } + ], + "responses": { + "200": { + "description": "The requested CVE Record", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "../schemas/cve/get-cve-record-response.json" + }, + { + "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + } + ] + }, + "examples": { + "Published Record": { + "$ref": "#/components/examples/publishedRecord" + }, + "Rejected Record": { + "$ref": "#/components/examples/rejectedRecord" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "headers": { + "RateLimit-Limit": { + "schema": { + "type": "integer" + }, + "description": "Indicates the service limit associated with the client in the current time window. If the client exceeds that limit, it MAY not be served." + }, + "RateLimit-Policy": { + "schema": { + "type": "string" + }, + "description": "Indicates a service policy currently associated with the client. Its value is informative." + }, + "RateLimit-Remaining": { + "schema": { + "type": "integer" + }, + "description": "Indicates the remaining quota units associated with the expiring-limit. Clients MUST NOT assume that a positive remaining value is a guarantee that further requests will be served. When the value of the remaining keyword is low, it indicates that the server may soon throttle the client." + }, + "RateLimit-Reset": { + "schema": { + "type": "integer" + }, + "description": "Indicates the number of seconds until the available quota units associated with the expiring-limit resets." + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } - } - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-secretariat-request.json" - } - } - } - } - } - }, - "/cve": { - "get": { - "tags": [ - "CVE Record" - ], - "summary": "Retrieves all CVE Records after applying the query parameters as filters (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves all CVE records for all organizations

", - "operationId": "cveGetFiltered", - "parameters": [ - { - "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedLt" - }, - { - "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedGt" - }, - { - "$ref": "#/components/parameters/cveState" - }, - { - "$ref": "#/components/parameters/countOnly" - }, - { - "$ref": "#/components/parameters/assignerShortName" - }, - { - "$ref": "#/components/parameters/assigner" - }, - { - "$ref": "#/components/parameters/pageQuery" - }, - { - "$ref": "#/components/parameters/cnaModified" - }, - { - "$ref": "#/components/parameters/adpShortName" - } - ], - "responses": { - "200": { - "description": "A filtered list of CVE Records, along with pagination fields if results span multiple pages of data", - "content": { - "application/json": { - "schema": { - "oneOf": [ + }, + "post": { + "tags": [ + "CVE Record" + ], + "summary": "Creates a CVE Record from full CVE Record JSON for the specified ID (accessible to Secretariat.)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates a CVE Record for any organization

", + "operationId": "cveSubmit", + "parameters": [ { - "$ref": "../schemas/cve/list-cve-records-response.json" + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the record being submitted" }, { - "$ref": "../schemas/cve/create-cve-record-rejection-response.json" - } - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - } - } - } - }, - "/cve_cursor": { - "get": { - "tags": [ - "CVE Record" - ], - "summary": "Retrieves all CVE Records after applying the query parameters as filters. Uses cursor pagination to paginate results (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves all CVE records for all organizations

", - "operationId": "cveGetFilteredCursor", - "parameters": [ - { - "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedLt" - }, - { - "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedGt" - }, - { - "$ref": "#/components/parameters/cveState" - }, - { - "$ref": "#/components/parameters/countOnly" - }, - { - "$ref": "#/components/parameters/assignerShortName" - }, - { - "$ref": "#/components/parameters/assigner" - }, - { - "$ref": "#/components/parameters/cnaModified" - }, - { - "$ref": "#/components/parameters/adpShortName" - }, - { - "$ref": "#/components/parameters/nextPage" - }, - { - "$ref": "#/components/parameters/previousPage" - }, - { - "$ref": "#/components/parameters/limit" - } - ], - "responses": { - "200": { - "description": "A filtered list of CVE Records, along with pagination fields if results span multiple pages of data", - "content": { - "application/json": { - "schema": { - "oneOf": [ + "$ref": "#/components/parameters/apiEntityHeader" + }, { - "$ref": "../schemas/cve/cursor-cve-records-response.json" + "$ref": "#/components/parameters/apiUserHeader" }, { - "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The CVE Record created", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-secretariat-request.json" + } + } } - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" } - } - } - } - } - } - }, - "/cve/{id}/cna": { - "post": { - "tags": [ - "CVE Record" - ], - "summary": "Creates a CVE Record from CNA Container JSON for the specified ID (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Creates CVE Record for a CVE ID owned by their organization

Secretariat: Creates CVE Record for CVE IDs owned by any organization

", - "operationId": "cveCnaCreateSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The CVE ID for the record being created" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The CVE Record created", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "put": { + "tags": [ + "CVE Record" + ], + "summary": "Updates a CVE Record from full CVE Record JSON for the specified ID (accessible to Secretariat.)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Updates a CVE Record for any organization

", + "operationId": "cveUpdateSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the record being updated" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The updated CVE Record", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/update-full-cve-record-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-secretariat-request.json" + } + } + } } - } } - } }, - "requestBody": { - "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-cna-request.json" - } - } - } - } - }, - "put": { - "tags": [ - "CVE Record" - ], - "summary": "Updates the CVE Record from CNA Container JSON for the specified ID (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates a CVE Record for records that are owned by their organization

Secretariat: Updates a CVE Record for records that are owned by any organization

", - "operationId": "cveCnaUpdateSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The CVE ID for which the record is being updated" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The updated CVE Record", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/update-full-cve-record-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "/cve": { + "get": { + "tags": [ + "CVE Record" + ], + "summary": "Retrieves all CVE Records after applying the query parameters as filters (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves all CVE records for all organizations

", + "operationId": "cveGetFiltered", + "parameters": [ + { + "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedLt" + }, + { + "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedGt" + }, + { + "$ref": "#/components/parameters/cveState" + }, + { + "$ref": "#/components/parameters/countOnly" + }, + { + "$ref": "#/components/parameters/assignerShortName" + }, + { + "$ref": "#/components/parameters/assigner" + }, + { + "$ref": "#/components/parameters/pageQuery" + }, + { + "$ref": "#/components/parameters/cnaModified" + }, + { + "$ref": "#/components/parameters/adpShortName" + } + ], + "responses": { + "200": { + "description": "A filtered list of CVE Records, along with pagination fields if results span multiple pages of data", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "../schemas/cve/list-cve-records-response.json" + }, + { + "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - } }, - "requestBody": { - "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-cna-request.json" - } - } - } - } - } - }, - "/cve/{id}/reject": { - "post": { - "tags": [ - "CVE Record" - ], - "summary": "Creates a rejected CVE Record for the specified ID if no record yet exists (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Creates a rejected CVE Record for a record owned by their organization

Secretariat: Creates a rejected CVE Record for a record owned by any organization

", - "operationId": "cveCnaCreateReject", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The CVE ID for the record being rejected" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The rejected CVE Record", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-rejection-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "/cve_cursor": { + "get": { + "tags": [ + "CVE Record" + ], + "summary": "Retrieves all CVE Records after applying the query parameters as filters. Uses cursor pagination to paginate results (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves all CVE records for all organizations

", + "operationId": "cveGetFilteredCursor", + "parameters": [ + { + "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedLt" + }, + { + "$ref": "#/components/parameters/cveRecordFilteredTimeModifiedGt" + }, + { + "$ref": "#/components/parameters/cveState" + }, + { + "$ref": "#/components/parameters/countOnly" + }, + { + "$ref": "#/components/parameters/assignerShortName" + }, + { + "$ref": "#/components/parameters/assigner" + }, + { + "$ref": "#/components/parameters/cnaModified" + }, + { + "$ref": "#/components/parameters/adpShortName" + }, + { + "$ref": "#/components/parameters/nextPage" + }, + { + "$ref": "#/components/parameters/previousPage" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "A filtered list of CVE Records, along with pagination fields if results span multiple pages of data", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "../schemas/cve/cursor-cve-records-response.json" + }, + { + "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - } }, - "requestBody": { - "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/create-cve-record-rejection-request.json" - } - } - } - } - }, - "put": { - "tags": [ - "CVE Record" - ], - "summary": "Updates an existing CVE Record with a rejected record for the specified ID (accessible to CNAs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates a rejected CVE Record for a record owned by their organization

Secretariat: Updates a rejected CVE Record for a record owned by any organization

", - "operationId": "cveCnaUpdateReject", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The CVE ID for the record being rejected" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The rejected CVE Record", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/update-cve-record-rejection-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "/cve/{id}/cna": { + "post": { + "tags": [ + "CVE Record" + ], + "summary": "Creates a CVE Record from CNA Container JSON for the specified ID (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Creates CVE Record for a CVE ID owned by their organization

Secretariat: Creates CVE Record for CVE IDs owned by any organization

", + "operationId": "cveCnaCreateSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the record being created" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The CVE Record created", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-cna-request.json" + } + } + } } - } - } - } - }, - "requestBody": { - "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/cve/update-cve-record-rejection-request.json" - } - } - } - } - } - }, - "/cve/{id}/adp": { - "put": { - "tags": [ - "CVE Record" - ], - "summary": "Updates the CVE Record from ADP Container JSON for the specified ID (accessible to ADPs and Secretariat)", - "description": "

Access Control

User must belong to an organization with the ADP or Secretariat role

Expected Behavior

ADP: Updates a CVE Record for records that are owned by any organization

Secretariat: Updates a CVE Record for records that are owned by any organization

", - "operationId": "cveAdpUpdateSingle", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The CVE ID for which the record is being updated" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "The updated CVE Record", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/cve/update-full-cve-record-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/errors/generic.json" + "put": { + "tags": [ + "CVE Record" + ], + "summary": "Updates the CVE Record from CNA Container JSON for the specified ID (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates a CVE Record for records that are owned by their organization

Secretariat: Updates a CVE Record for records that are owned by any organization

", + "operationId": "cveCnaUpdateSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for which the record is being updated" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The updated CVE Record", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/update-full-cve-record-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-cna-request.json" + } + } + } } - } } - } }, - "requestBody": { - "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "/schemas/cve/create-adp-record-adp-request.json" - } - } - } - } - } - }, - "/org": { - "get": { - "tags": [ - "Organization" - ], - "summary": "Retrieves all organizations (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves information about all organizations

", - "operationId": "orgAll", - "parameters": [ - { - "$ref": "#/components/parameters/pageQuery" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns information about all organizations, along with pagination fields if results span multiple pages of data", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/org/list-orgs-response.json" + "/cve/{id}/reject": { + "post": { + "tags": [ + "CVE Record" + ], + "summary": "Creates a rejected CVE Record for the specified ID if no record yet exists (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Creates a rejected CVE Record for a record owned by their organization

Secretariat: Creates a rejected CVE Record for a record owned by any organization

", + "operationId": "cveCnaCreateReject", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the record being rejected" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The rejected CVE Record", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-rejection-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/create-cve-record-rejection-request.json" + } + } + } } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" + }, + "put": { + "tags": [ + "CVE Record" + ], + "summary": "Updates an existing CVE Record with a rejected record for the specified ID (accessible to CNAs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the CNA or Secretariat role

Expected Behavior

CNA: Updates a rejected CVE Record for a record owned by their organization

Secretariat: Updates a rejected CVE Record for a record owned by any organization

", + "operationId": "cveCnaUpdateReject", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for the record being rejected" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The rejected CVE Record", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/update-cve-record-rejection-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/cve/update-cve-record-rejection-request.json" + } + } + } } - } } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/cve/{id}/adp": { + "put": { + "tags": [ + "CVE Record" + ], + "summary": "Updates the CVE Record from ADP Container JSON for the specified ID (accessible to ADPs and Secretariat)", + "description": "

Access Control

User must belong to an organization with the ADP or Secretariat role

Expected Behavior

ADP: Updates a CVE Record for records that are owned by any organization

Secretariat: Updates a CVE Record for records that are owned by any organization

", + "operationId": "cveAdpUpdateSingle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The CVE ID for which the record is being updated" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "The updated CVE Record", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/cve/update-full-cve-record-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "description": "Note: providerMetadata is set by the server. If provided, it will be overwritten.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "/schemas/cve/create-adp-record-adp-request.json" + } + } + } } - } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/org": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Retrieves all organizations (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves information about all organizations

", + "operationId": "orgAll", + "parameters": [ + { + "$ref": "#/components/parameters/pageQuery" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns information about all organizations, along with pagination fields if results span multiple pages of data", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/list-orgs-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "post": { + "tags": [ + "Organization" + ], + "summary": "Creates an organization as specified in the request body (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates an organization

", + "operationId": "orgCreateSingle", + "parameters": [ + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns information about the organization created", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/create-org-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/create-org-request.json" + } + } + } } - } } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/org/{identifier}": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Retrieves information about the organization specified by short name or UUID (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves organization record for the specified shortname or UUID if it is the user's organization

Secretariat: Retrieves information about any organization

", + "operationId": "orgSingle", + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname or UUID of the organization" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns the organization information", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/get-org-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - } - } - }, - "post": { - "tags": [ - "Organization" - ], - "summary": "Creates an organization as specified in the request body (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Creates an organization

", - "operationId": "orgCreateSingle", - "parameters": [ - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns information about the organization created", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/org/create-org-response.json" + }, + "/org/{shortname}": { + "put": { + "tags": [ + "Organization" + ], + "summary": "Updates information about the organization specified by short name (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Updates any organization's information

", + "operationId": "orgUpdateSingle", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "$ref": "#/components/parameters/id_quota" + }, + { + "$ref": "#/components/parameters/name" + }, + { + "$ref": "#/components/parameters/newShortname" + }, + { + "$ref": "#/components/parameters/active_roles_add" + }, + { + "$ref": "#/components/parameters/active_roles_remove" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns information about the organization updated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/update-org-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" + }, + "/org/{shortname}/id_quota": { + "get": { + "tags": [ + "Organization" + ], + "summary": "Retrieves an organization's CVE ID quota (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves the CVE ID quota for the user's organization

Secretariat: Retrieves the CVE ID quota for any organization

", + "operationId": "orgIdQuota", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns the CVE ID quota for an organization", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/org/get-org-quota-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/org/{shortname}/users": { + "get": { + "tags": [ + "Users" + ], + "summary": "Retrieves all users for the organization with the specified short name (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves information about users in the same organization

Secretariat: Retrieves all user information for any organization

", + "operationId": "userOrgAll", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "$ref": "#/components/parameters/pageQuery" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns all users for the organization, along with pagination fields if results span multiple pages of data", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/list-users-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/org/{shortname}/user": { + "post": { + "tags": [ + "Users" + ], + "summary": "Create a user with the provided short name as the owning organization (accessible to Admins and Secretariats)", + "description": "

Access Control

User must belong to an organization with the Secretariat role or be an Admin of the organization

Expected Behavior

Admin User: Creates a user for the Admin's organization

Secretariat: Creates a user for any organization

", + "operationId": "userCreateSingle", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns the new user information (with the secret)", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/create-user-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/create-user-request.json" + } + } + } } - } } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/org/{shortname}/user/{username}": { + "get": { + "tags": [ + "Users" + ], + "summary": "Retrieves information about a user for the specified username and organization short name (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves information about a user in the same organization

Secretariat: Retrieves any user's information

", + "operationId": "userSingle", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The username of the user" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns information about the specified user", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/get-user-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "put": { + "tags": [ + "Users" + ], + "summary": "Updates information about a user for the specified username and organization shortname (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular User: Updates the user's own information. Only name fields may be changed.

Admin User: Updates information about a user in the Admin's organization. Allowed to change all fields except org_short_name.

Secretariat: Updates information about a user in any organization. Allowed to change all fields.

", + "operationId": "userUpdateSingle", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The username of the user" + }, + { + "$ref": "#/components/parameters/active" + }, + { + "$ref": "#/components/parameters/activeUserRolesAdd" + }, + { + "$ref": "#/components/parameters/activeUserRolesRemove" + }, + { + "$ref": "#/components/parameters/nameFirst" + }, + { + "$ref": "#/components/parameters/nameLast" + }, + { + "$ref": "#/components/parameters/nameMiddle" + }, + { + "$ref": "#/components/parameters/nameSuffix" + }, + { + "$ref": "#/components/parameters/newUsername" + }, + { + "$ref": "#/components/parameters/orgShortname" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns the updated user information", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/update-user-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/org/create-org-request.json" - } - } - } - } - } - }, - "/org/{identifier}": { - "get": { - "tags": [ - "Organization" - ], - "summary": "Retrieves information about the organization specified by short name or UUID (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves organization record for the specified shortname or UUID if it is the user's organization

Secretariat: Retrieves information about any organization

", - "operationId": "orgSingle", - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The shortname or UUID of the organization" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns the organization information", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/org/get-org-response.json" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + "/org/{shortname}/user/{username}/reset_secret": { + "put": { + "tags": [ + "Users" + ], + "summary": "Reset the API key for a user (accessible to all registered users)", + "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular User: Resets user's own API secret

Admin User: Resets any user's API secret in the Admin's organization

Secretariat: Resets any user's API secret

", + "operationId": "userResetSecret", + "parameters": [ + { + "name": "shortname", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The shortname of the organization" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The username of the user" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns the new API key", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/reset-secret-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/users": { + "get": { + "tags": [ + "Users" + ], + "summary": "Retrieves information about all registered users (accessible to Secretariat)", + "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves information about all users for all organizations

", + "operationId": "userAll", + "parameters": [ + { + "$ref": "#/components/parameters/pageQuery" + }, + { + "$ref": "#/components/parameters/apiEntityHeader" + }, + { + "$ref": "#/components/parameters/apiUserHeader" + }, + { + "$ref": "#/components/parameters/apiSecretHeader" + } + ], + "responses": { + "200": { + "description": "Returns all users, along with pagination fields if results span multiple pages of data.", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/user/list-users-response.json" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/bad-request.json" + } + } + } + }, + "401": { + "description": "Not Authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "../schemas/errors/generic.json" + } + } + } + } } - } } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "/health-check": { + "get": { + "tags": [ + "Utilities" + ], + "summary": "Checks that the system is running (accessible to all users)", + "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

Returns a 200 response code when CVE Services are running

", + "operationId": "healthCheck", + "parameters": [], + "responses": { + "200": { + "description": "Returns a 200 response code" + } } - } } - } } - } }, - "/org/{shortname}": { - "put": { - "tags": [ - "Organization" - ], - "summary": "Updates information about the organization specified by short name (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Updates any organization's information

", - "operationId": "orgUpdateSingle", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The shortname of the organization" - }, - { - "$ref": "#/components/parameters/id_quota" - }, - { - "$ref": "#/components/parameters/name" - }, - { - "$ref": "#/components/parameters/newShortname" - }, - { - "$ref": "#/components/parameters/active_roles_add" - }, - { - "$ref": "#/components/parameters/active_roles_remove" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns information about the organization updated", - "content": { - "application/json": { + "components": { + "parameters": { + "active": { + "in": "query", + "name": "active", + "description": "The new active state for the user entry. Accepted values are 1, true, or yes to indicate true, and 0, false, or no to indicate false", + "required": false, "schema": { - "$ref": "../schemas/org/update-org-response.json" + "type": "boolean" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" - } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "active_roles_add": { + "in": "query", + "name": "active_roles.add", + "description": "Add an active role to the organization", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CNA", + "SECRETARIAT" + ] } - } - } - } - } - } - }, - "/org/{shortname}/id_quota": { - "get": { - "tags": [ - "Organization" - ], - "summary": "Retrieves an organization's CVE ID quota (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves the CVE ID quota for the user's organization

Secretariat: Retrieves the CVE ID quota for any organization

", - "operationId": "orgIdQuota", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The shortname of the organization" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns the CVE ID quota for an organization", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/org/get-org-quota-response.json" + "active_roles_remove": { + "in": "query", + "name": "active_roles.remove", + "description": "Remove an active role from the organization", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CNA", + "SECRETARIAT" + ] } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/bad-request.json" + }, + "activeUserRolesAdd": { + "in": "query", + "name": "active_roles.add", + "description": "Add an active role to the user", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ADMIN" + ] } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "activeUserRolesRemove": { + "in": "query", + "name": "active_roles.remove", + "description": "Remove an active role from the user", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ADMIN" + ] } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { + }, + "apiEntityHeader": { + "in": "header", + "name": "CVE-API-ORG", + "description": "The shortname for the organization associated with the user requesting authentication", + "required": true, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "apiUserHeader": { + "in": "header", + "name": "CVE-API-USER", + "description": "The username for the account making the request", + "required": true, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "apiSecretHeader": { + "in": "header", + "name": "CVE-API-KEY", + "description": "The user's API key", + "required": true, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - } - } - } - }, - "/org/{shortname}/users": { - "get": { - "tags": [ - "Users" - ], - "summary": "Retrieves all users for the organization with the specified short name (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves information about users in the same organization

Secretariat: Retrieves all user information for any organization

", - "operationId": "userOrgAll", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The shortname of the organization" - }, - { - "$ref": "#/components/parameters/pageQuery" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns all users for the organization, along with pagination fields if results span multiple pages of data", - "content": { - "application/json": { + "amount": { + "in": "query", + "name": "amount", + "description": "Quantity of CVE IDs to reserve", + "required": true, "schema": { - "$ref": "../schemas/user/list-users-response.json" + "type": "integer", + "format": "int32" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "assigner": { + "in": "query", + "name": "assigner", + "description": "Filter by assigner org UUID", + "required": false, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "string" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "assignerShortName": { + "in": "query", + "name": "assigner_short_name", + "description": "Filter by assignerShortName", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "batch_type": { + "in": "query", + "name": "batch_type", + "description": "Required when amount is greater than one, determines whether the reserved CVE IDs should be sequential or non-sequential", + "required": false, + "schema": { + "type": "string", + "enum": [ + "sequential", + "non-sequential", + "nonsequential" + ] } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "countOnly": { + "in": "query", + "name": "count_only", + "description": "Get count of records that match query. Accepted values are 1, true, or yes to indicate true, and 0, false, or no to indicate false", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "boolean" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "nextPage": { + "in": "query", + "name": "next_page", + "description": "Key returned by a GET /cve_cursor call that must be used to get the next page of results in a subsequent call", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - } - } - } - }, - "/org/{shortname}/user": { - "post": { - "tags": [ - "Users" - ], - "summary": "Create a user with the provided short name as the owning organization (accessible to Admins and Secretariats)", - "description": "

Access Control

User must belong to an organization with the Secretariat role or be an Admin of the organization

Expected Behavior

Admin User: Creates a user for the Admin's organization

Secretariat: Creates a user for any organization

", - "operationId": "userCreateSingle", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The shortname of the organization" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns the new user information (with the secret)", - "content": { - "application/json": { + "previousPage": { + "in": "query", + "name": "previous_page", + "description": "Key returned by a GET /cve_cursor call that must be used to get the previous page of results in a subsequent call", + "required": false, "schema": { - "$ref": "../schemas/user/create-user-response.json" + "type": "string" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "limit": { + "in": "query", + "name": "limit", + "description": "CVE records to return per page. Must be between 1-500. ", + "required": false, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "integer" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "cnaModified": { + "in": "query", + "name": "cna_modified", + "description": "Only get CVE records with cnaContainers that have been modified/created within the set time_modified range. Requires at least one time_modified parameter set", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "boolean" } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { + }, + "adpShortName": { + "in": "query", + "name": "adp_short_name", + "description": "Only get CVE records that have an adpContainer owned by this org.", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "cveState": { + "in": "query", + "name": "state", + "description": "Filter by state", + "schema": { + "type": "string", + "enum": [ + "PUBLISHED", + "REJECTED" + ] } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "cve_year": { + "in": "query", + "name": "cve_year", + "description": "The year the CVE IDs will be reserved for (i.e., 1999, ..., currentYear + 1)", + "required": true, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "integer", + "format": "int32" } - } - } - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/user/create-user-request.json" - } - } - } - } - } - }, - "/org/{shortname}/user/{username}": { - "get": { - "tags": [ - "Users" - ], - "summary": "Retrieves information about a user for the specified username and organization short name (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular, CNA & Admin Users: Retrieves information about a user in the same organization

Secretariat: Retrieves any user's information

", - "operationId": "userSingle", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The shortname of the organization" - }, - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The username of the user" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns information about the specified user", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/user/get-user-response.json" + "cveIdGetFilteredState": { + "in": "query", + "name": "state", + "description": "Filter by state ", + "required": false, + "schema": { + "type": "string", + "enum": [ + "RESERVED", + "PUBLISHED", + "REJECTED" + ] } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "cveIdGetFilteredCveIdYear": { + "in": "query", + "name": "cve_id_year", + "description": "Filter by the year of the CVE IDs", + "required": false, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "string" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "cveIdGetFilteredTimeReservedLt": { + "in": "query", + "name": "time_reserved.lt", + "description": "Most recent reserved timestamp to retrieve. Include with all requests potentially returning multiple pages of CVE IDs to avoid issues if new IDs are reserved during use.

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string", + "format": "date-time" } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { + }, + "cveIdGetFilteredTimeReservedGt": { + "in": "query", + "name": "time_reserved.gt", + "description": "Earliest CVE ID reserved timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string", + "format": "date-time" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "cveIdGetFilteredTimeModifiedLt": { + "in": "query", + "name": "time_modified.lt", + "description": "Most recent modified timestamp to retrieve. Include with all requests using a time_modified.gt filter potentially returning multiple pages of CVE IDs. This will avoid issues if IDs are reserved or modified during use.

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string", + "format": "date-time" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "cveIdGetFilteredTimeModifiedGt": { + "in": "query", + "name": "time_modified.gt", + "description": "Earliest CVE ID modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string", + "format": "date-time" } - } - } - } - } - }, - "put": { - "tags": [ - "Users" - ], - "summary": "Updates information about a user for the specified username and organization shortname (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular User: Updates the user's own information. Only name fields may be changed.

Admin User: Updates information about a user in the Admin's organization. Allowed to change all fields except org_short_name.

Secretariat: Updates information about a user in any organization. Allowed to change all fields.

", - "operationId": "userUpdateSingle", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The shortname of the organization" - }, - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The username of the user" - }, - { - "$ref": "#/components/parameters/active" - }, - { - "$ref": "#/components/parameters/activeUserRolesAdd" - }, - { - "$ref": "#/components/parameters/activeUserRolesRemove" - }, - { - "$ref": "#/components/parameters/nameFirst" - }, - { - "$ref": "#/components/parameters/nameLast" - }, - { - "$ref": "#/components/parameters/nameMiddle" - }, - { - "$ref": "#/components/parameters/nameSuffix" - }, - { - "$ref": "#/components/parameters/newUsername" - }, - { - "$ref": "#/components/parameters/orgShortname" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns the updated user information", - "content": { - "application/json": { + "cveRecordFilteredTimeModifiedLt": { + "in": "query", + "name": "time_modified.lt", + "description": "Most recent CVE record modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/user/update-user-response.json" + "type": "string", + "format": "date-time" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "cveRecordFilteredTimeModifiedGt": { + "in": "query", + "name": "time_modified.gt", + "description": "Earliest CVE record modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", + "required": false, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "string", + "format": "date-time" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "id_quota": { + "in": "query", + "name": "id_quota", + "description": "The new number of CVE IDs the organization is allowed to have in the RESERVED state at one time", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "integer", + "format": "int32", + "minimum": 0, + "maximum": 100000 } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { + }, + "name": { + "in": "query", + "name": "name", + "description": "The new name for the organization", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "nameFirst": { + "in": "query", + "name": "name.first", + "description": "The new first name for the user entry", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "nameLast": { + "in": "query", + "name": "name.last", + "description": "The new last name for the user entry", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - } - } - } - }, - "/org/{shortname}/user/{username}/reset_secret": { - "put": { - "tags": [ - "Users" - ], - "summary": "Reset the API key for a user (accessible to all registered users)", - "description": "

Access Control

All registered users can access this endpoint

Expected Behavior

Regular User: Resets user's own API secret

Admin User: Resets any user's API secret in the Admin's organization

Secretariat: Resets any user's API secret

", - "operationId": "userResetSecret", - "parameters": [ - { - "name": "shortname", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The shortname of the organization" - }, - { - "name": "username", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "description": "The username of the user" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns the new API key", - "content": { - "application/json": { + "nameMiddle": { + "in": "query", + "name": "name.middle", + "description": "The new middle name for the user entry", + "required": false, "schema": { - "$ref": "../schemas/user/reset-secret-response.json" + "type": "string" } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "nameSuffix": { + "in": "query", + "name": "name.suffix", + "description": "The new suffix for the user entry", + "required": false, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "string" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "newShortname": { + "in": "query", + "name": "new_short_name", + "description": "The new shortname for the organization", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { + }, + "newUsername": { + "in": "query", + "name": "new_username", + "description": "The new username for the user, preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { + }, + "org": { + "in": "query", + "name": "org", + "description": "The shortname of the new owning_cna for the CVE ID", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { + }, + "orgShortname": { + "in": "query", + "name": "org_short_name", + "description": "The new organization for the user", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - } - } - } - }, - "/users": { - "get": { - "tags": [ - "Users" - ], - "summary": "Retrieves information about all registered users (accessible to Secretariat)", - "description": "

Access Control

User must belong to an organization with the Secretariat role

Expected Behavior

Secretariat: Retrieves information about all users for all organizations

", - "operationId": "userAll", - "parameters": [ - { - "$ref": "#/components/parameters/pageQuery" - }, - { - "$ref": "#/components/parameters/apiEntityHeader" - }, - { - "$ref": "#/components/parameters/apiUserHeader" - }, - { - "$ref": "#/components/parameters/apiSecretHeader" - } - ], - "responses": { - "200": { - "description": "Returns all users, along with pagination fields if results span multiple pages of data.", - "content": { - "application/json": { + }, + "pageQuery": { + "in": "query", + "name": "page", + "description": "The current page in the paginator", + "required": false, "schema": { - "$ref": "../schemas/user/list-users-response.json" + "type": "integer", + "format": "int32", + "minimum": 1 } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { + }, + "short_name": { + "in": "query", + "name": "short_name", + "description": "The CNA that will own the reserved CVE IDs", + "required": true, "schema": { - "$ref": "../schemas/errors/bad-request.json" + "type": "string" } - } - } - }, - "401": { - "description": "Not Authenticated", - "content": { - "application/json": { + }, + "shortname": { + "in": "query", + "name": "shortname", + "description": "The new shortname for the organization", + "required": false, "schema": { - "$ref": "../schemas/errors/generic.json" + "type": "string" } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "state": { + "in": "query", + "name": "state", + "description": "The new state for the CVE ID", + "required": false, + "schema": { + "type": "string", + "enum": [ + "RESERVED", + "REJECTED" + ] } - } } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "examples": { + "publishedRecord": { + "value": { + "containers": { + "cna": { + "affected": [ + { + "vendor": "string", + "product": "string", + "versions": [ + { + "version": "string", + "status": "string" + } + ] + } + ], + "descriptions": [ + { + "lang": "string", + "value": "string" + } + ], + "problemTypes": [ + { + "descriptions": [ + { + "description": "string", + "lang": "string", + "type": "string" + } + ] + } + ], + "providerMetadata": { + "orgId": "string", + "shortName": "string", + "dateUpdated": "2022-05-13T14:26:39.293Z" + }, + "references": [ + { + "name": "string", + "tags": [ + "string" + ], + "url": "string" + } + ] + } + }, + "cveMetadata": { + "assignerOrgId": "string", + "cveId": "string", + "state": "string", + "assignerShortName": "string", + "requesterUserId": "string", + "dateReserved": "string", + "datePublished": "string" + }, + "dataType": "string", + "dataVersion": "string" } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "../schemas/errors/generic.json" + }, + "rejectedRecord": { + "value": { + "containers": { + "cna": { + "rejectedReasons": [ + { + "lang": "string", + "value": "string", + "supportingMedia": [ + { + "type": "string", + "base64": false, + "value": "string" + } + ] + } + ], + "replacedBy": [ + "string" + ], + "providerMetadata": { + "orgId": "string", + "shortName": "string", + "dateUpdated": "2022-05-13T14:27:39.617Z" + } + } + }, + "cveMetadata": { + "assignerOrgId": "string", + "cveId": "string", + "state": "string", + "assignerShortName": "string", + "requesterUserId": "string", + "dateReserved": "string", + "datePublished": "string" + }, + "dataType": "string", + "dataVersion": "string" } - } - } - } - } - } - }, - "/health-check": { - "get": { - "tags": [ - "Utilities" - ], - "summary": "Checks that the system is running (accessible to all users)", - "description": "

Access Control

Endpoint is accessible to all

Expected Behavior

Returns a 200 response code when CVE Services are running

", - "operationId": "healthCheck", - "parameters": [], - "responses": { - "200": { - "description": "Returns a 200 response code" - } - } - } - } - }, - "components": { - "parameters": { - "active": { - "in": "query", - "name": "active", - "description": "The new active state for the user entry. Accepted values are 1, true, or yes to indicate true, and 0, false, or no to indicate false", - "required": false, - "schema": { - "type": "boolean" - } - }, - "active_roles_add": { - "in": "query", - "name": "active_roles.add", - "description": "Add an active role to the organization", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CNA", - "SECRETARIAT" - ] - } - }, - "active_roles_remove": { - "in": "query", - "name": "active_roles.remove", - "description": "Remove an active role from the organization", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CNA", - "SECRETARIAT" - ] - } - }, - "activeUserRolesAdd": { - "in": "query", - "name": "active_roles.add", - "description": "Add an active role to the user", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ADMIN" - ] - } - }, - "activeUserRolesRemove": { - "in": "query", - "name": "active_roles.remove", - "description": "Remove an active role from the user", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ADMIN" - ] - } - }, - "apiEntityHeader": { - "in": "header", - "name": "CVE-API-ORG", - "description": "The shortname for the organization associated with the user requesting authentication", - "required": true, - "schema": { - "type": "string" - } - }, - "apiUserHeader": { - "in": "header", - "name": "CVE-API-USER", - "description": "The username for the account making the request", - "required": true, - "schema": { - "type": "string" - } - }, - "apiSecretHeader": { - "in": "header", - "name": "CVE-API-KEY", - "description": "The user's API key", - "required": true, - "schema": { - "type": "string" - } - }, - "amount": { - "in": "query", - "name": "amount", - "description": "Quantity of CVE IDs to reserve", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - "assigner": { - "in": "query", - "name": "assigner", - "description": "Filter by assigner org UUID", - "required": false, - "schema": { - "type": "string" - } - }, - "assignerShortName": { - "in": "query", - "name": "assigner_short_name", - "description": "Filter by assignerShortName", - "required": false, - "schema": { - "type": "string" - } - }, - "batch_type": { - "in": "query", - "name": "batch_type", - "description": "Required when amount is greater than one, determines whether the reserved CVE IDs should be sequential or non-sequential", - "required": false, - "schema": { - "type": "string", - "enum": [ - "sequential", - "non-sequential", - "nonsequential" - ] - } - }, - "countOnly": { - "in": "query", - "name": "count_only", - "description": "Get count of records that match query. Accepted values are 1, true, or yes to indicate true, and 0, false, or no to indicate false", - "required": false, - "schema": { - "type": "boolean" - } - }, - "nextPage": { - "in": "query", - "name": "next_page", - "description": "Key returned by a GET /cve_cursor call that must be used to get the next page of results in a subsequent call", - "required": false, - "schema": { - "type": "string" - } - }, - "previousPage": { - "in": "query", - "name": "previous_page", - "description": "Key returned by a GET /cve_cursor call that must be used to get the previous page of results in a subsequent call", - "required": false, - "schema": { - "type": "string" - } - }, - "limit": { - "in": "query", - "name": "limit", - "description": "CVE records to return per page. Must be between 1-500. ", - "required": false, - "schema": { - "type": "integer" - } - }, - "cnaModified": { - "in": "query", - "name": "cna_modified", - "description": "Only get CVE records with cnaContainers that have been modified/created within the set time_modified range. Requires at least one time_modified parameter set", - "required": false, - "schema": { - "type": "boolean" - } - }, - "adpShortName": { - "in": "query", - "name": "adp_short_name", - "description": "Only get CVE records that have an adpContainer owned by this org.", - "required": false, - "schema": { - "type": "string" - } - }, - "cveState": { - "in": "query", - "name": "state", - "description": "Filter by state", - "schema": { - "type": "string", - "enum": [ - "PUBLISHED", - "REJECTED" - ] - } - }, - "cve_year": { - "in": "query", - "name": "cve_year", - "description": "The year the CVE IDs will be reserved for (i.e., 1999, ..., currentYear + 1)", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - "cveIdGetFilteredState": { - "in": "query", - "name": "state", - "description": "Filter by state ", - "required": false, - "schema": { - "type": "string", - "enum": [ - "RESERVED", - "PUBLISHED", - "REJECTED" - ] - } - }, - "cveIdGetFilteredCveIdYear": { - "in": "query", - "name": "cve_id_year", - "description": "Filter by the year of the CVE IDs", - "required": false, - "schema": { - "type": "string" - } - }, - "cveIdGetFilteredTimeReservedLt": { - "in": "query", - "name": "time_reserved.lt", - "description": "Most recent reserved timestamp to retrieve. Include with all requests potentially returning multiple pages of CVE IDs to avoid issues if new IDs are reserved during use.

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "cveIdGetFilteredTimeReservedGt": { - "in": "query", - "name": "time_reserved.gt", - "description": "Earliest CVE ID reserved timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "cveIdGetFilteredTimeModifiedLt": { - "in": "query", - "name": "time_modified.lt", - "description": "Most recent modified timestamp to retrieve. Include with all requests using a time_modified.gt filter potentially returning multiple pages of CVE IDs. This will avoid issues if IDs are reserved or modified during use.

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "cveIdGetFilteredTimeModifiedGt": { - "in": "query", - "name": "time_modified.gt", - "description": "Earliest CVE ID modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "cveRecordFilteredTimeModifiedLt": { - "in": "query", - "name": "time_modified.lt", - "description": "Most recent CVE record modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "cveRecordFilteredTimeModifiedGt": { - "in": "query", - "name": "time_modified.gt", - "description": "Earliest CVE record modified timestamp to retrieve

Timestamp format : yyyy-MM-ddTHH:mm:ssZZZZ", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "id_quota": { - "in": "query", - "name": "id_quota", - "description": "The new number of CVE IDs the organization is allowed to have in the RESERVED state at one time", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "minimum": 0, - "maximum": 100000 - } - }, - "name": { - "in": "query", - "name": "name", - "description": "The new name for the organization", - "required": false, - "schema": { - "type": "string" - } - }, - "nameFirst": { - "in": "query", - "name": "name.first", - "description": "The new first name for the user entry", - "required": false, - "schema": { - "type": "string" - } - }, - "nameLast": { - "in": "query", - "name": "name.last", - "description": "The new last name for the user entry", - "required": false, - "schema": { - "type": "string" - } - }, - "nameMiddle": { - "in": "query", - "name": "name.middle", - "description": "The new middle name for the user entry", - "required": false, - "schema": { - "type": "string" - } - }, - "nameSuffix": { - "in": "query", - "name": "name.suffix", - "description": "The new suffix for the user entry", - "required": false, - "schema": { - "type": "string" - } - }, - "newShortname": { - "in": "query", - "name": "new_short_name", - "description": "The new shortname for the organization", - "required": false, - "schema": { - "type": "string" - } - }, - "newUsername": { - "in": "query", - "name": "new_username", - "description": "The new username for the user, preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.", - "required": false, - "schema": { - "type": "string" - } - }, - "org": { - "in": "query", - "name": "org", - "description": "The shortname of the new owning_cna for the CVE ID", - "required": false, - "schema": { - "type": "string" - } - }, - "orgShortname": { - "in": "query", - "name": "org_short_name", - "description": "The new organization for the user", - "required": false, - "schema": { - "type": "string" - } - }, - "pageQuery": { - "in": "query", - "name": "page", - "description": "The current page in the paginator", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "minimum": 1 - } - }, - "short_name": { - "in": "query", - "name": "short_name", - "description": "The CNA that will own the reserved CVE IDs", - "required": true, - "schema": { - "type": "string" - } - }, - "shortname": { - "in": "query", - "name": "shortname", - "description": "The new shortname for the organization", - "required": false, - "schema": { - "type": "string" - } - }, - "state": { - "in": "query", - "name": "state", - "description": "The new state for the CVE ID", - "required": false, - "schema": { - "type": "string", - "enum": [ - "RESERVED", - "REJECTED" - ] - } - } - }, - "examples": { - "publishedRecord": { - "value": { - "containers": { - "cna": { - "affected": [ - { - "vendor": "string", - "product": "string", - "versions": [ - { - "version": "string", - "status": "string" - } - ] - } - ], - "descriptions": [ - { - "lang": "string", - "value": "string" - } - ], - "problemTypes": [ - { - "descriptions": [ - { - "description": "string", - "lang": "string", - "type": "string" - } - ] - } - ], - "providerMetadata": { - "orgId": "string", - "shortName": "string", - "dateUpdated": "2022-05-13T14:26:39.293Z" - }, - "references": [ - { - "name": "string", - "tags": [ - "string" - ], - "url": "string" - } - ] - } - }, - "cveMetadata": { - "assignerOrgId": "string", - "cveId": "string", - "state": "string", - "assignerShortName": "string", - "requesterUserId": "string", - "dateReserved": "string", - "datePublished": "string" - }, - "dataType": "string", - "dataVersion": "string" - } - }, - "rejectedRecord": { - "value": { - "containers": { - "cna": { - "rejectedReasons": [ - { - "lang": "string", - "value": "string", - "supportingMedia": [ - { - "type": "string", - "base64": false, - "value": "string" + }, + "rejectedCreateCVERecord": { + "value": { + "message": "string", + "created": { + "containers": { + "cna": { + "rejectedReasons": [ + { + "lang": "string", + "value": "string", + "supportingMedia": [ + { + "type": "string", + "base64": false, + "value": "string" + } + ] + } + ], + "replacedBy": [ + "string" + ], + "providerMetadata": { + "orgId": "string", + "shortName": "string", + "dateUpdated": "2022-05-13T14:27:39.617Z" + } + } + }, + "cveMetadata": { + "assignerOrgId": "string", + "cveId": "string", + "state": "string", + "assignerShortName": "string", + "requesterUserId": "string", + "dateReserved": "string", + "datePublished": "string" + }, + "dataType": "string", + "dataVersion": "string" } - ] - } - ], - "replacedBy": [ - "string" - ], - "providerMetadata": { - "orgId": "string", - "shortName": "string", - "dateUpdated": "2022-05-13T14:27:39.617Z" - } - } - }, - "cveMetadata": { - "assignerOrgId": "string", - "cveId": "string", - "state": "string", - "assignerShortName": "string", - "requesterUserId": "string", - "dateReserved": "string", - "datePublished": "string" - }, - "dataType": "string", - "dataVersion": "string" - } - }, - "rejectedCreateCVERecord": { - "value": { - "message": "string", - "created": { - "containers": { - "cna": { - "rejectedReasons": [ - { - "lang": "string", - "value": "string", - "supportingMedia": [ - { - "type": "string", - "base64": false, - "value": "string" - } - ] - } - ], - "replacedBy": [ - "string" - ], - "providerMetadata": { - "orgId": "string", - "shortName": "string", - "dateUpdated": "2022-05-13T14:27:39.617Z" } - } - }, - "cveMetadata": { - "assignerOrgId": "string", - "cveId": "string", - "state": "string", - "assignerShortName": "string", - "requesterUserId": "string", - "dateReserved": "string", - "datePublished": "string" - }, - "dataType": "string", - "dataVersion": "string" - } + } } - } } - } } \ No newline at end of file diff --git a/datadump/pre-population/cves.json b/datadump/pre-population/cves.json index ee4c589c7..88dbcd1e4 100644 --- a/datadump/pre-population/cves.json +++ b/datadump/pre-population/cves.json @@ -88,57 +88,46 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" } ] @@ -197,37 +186,30 @@ "references": [ { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -322,47 +304,38 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Katherine Carson", - "refsource": "SONG", "url": "http://www.barker.com/faq.htm" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" } ] @@ -421,12 +394,10 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" } ] @@ -524,22 +495,18 @@ "references": [ { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "April Brandt", - "refsource": "SONG", "url": "https://www.logan.com/" } ] @@ -637,37 +604,30 @@ "references": [ { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" } ] @@ -804,37 +764,30 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Kevin Dickerson", - "refsource": "SONG", "url": "https://www.mora.com/posts/faq/" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" } ] @@ -893,37 +846,30 @@ "references": [ { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" } ] @@ -1099,57 +1045,46 @@ "references": [ { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Kevin Dickerson", - "refsource": "SONG", "url": "https://www.mora.com/posts/faq/" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" }, { "name": "https://myers-scott.com/", - "refsource": "MISC", "url": "https://myers-scott.com/" } ] @@ -1208,57 +1143,46 @@ "references": [ { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -1356,42 +1280,34 @@ "references": [ { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Kevin Dickerson", - "refsource": "SONG", "url": "https://www.mora.com/posts/faq/" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" } ] @@ -1567,37 +1483,30 @@ "references": [ { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" } ] @@ -1656,57 +1565,46 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -1804,57 +1702,46 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Antonio Lee", - "refsource": "AGO", "url": "https://www.west-perez.com/" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" } ] @@ -1991,52 +1878,42 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "April Brandt", - "refsource": "SONG", "url": "https://www.logan.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Antonio Lee", - "refsource": "AGO", "url": "https://www.west-perez.com/" } ] @@ -2095,37 +1972,30 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "https://myers-scott.com/", - "refsource": "MISC", "url": "https://myers-scott.com/" } ] @@ -2184,32 +2054,26 @@ "references": [ { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Kevin Dickerson", - "refsource": "SONG", "url": "https://www.mora.com/posts/faq/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Katherine Carson", - "refsource": "SONG", "url": "http://www.barker.com/faq.htm" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "https://myers-scott.com/", - "refsource": "MISC", "url": "https://myers-scott.com/" } ] @@ -2268,37 +2132,30 @@ "references": [ { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" } ] @@ -2357,17 +2214,14 @@ "references": [ { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -2426,22 +2280,18 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" } ] @@ -2539,27 +2389,22 @@ "references": [ { "name": "Katherine Carson", - "refsource": "SONG", "url": "http://www.barker.com/faq.htm" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" }, { "name": "Antonio Lee", - "refsource": "AGO", "url": "https://www.west-perez.com/" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -2618,32 +2463,26 @@ "references": [ { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -2702,57 +2541,46 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Charles Hooper", - "refsource": "GAS", "url": "https://www.harper.com/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" } ] @@ -2850,22 +2678,18 @@ "references": [ { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" } ] @@ -3041,27 +2865,22 @@ "references": [ { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" } ] @@ -3159,7 +2978,6 @@ "references": [ { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" } ] @@ -3413,12 +3231,10 @@ "references": [ { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" } ] @@ -3477,42 +3293,34 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "April Brandt", - "refsource": "SONG", "url": "https://www.logan.com/" } ] @@ -3571,57 +3379,46 @@ "references": [ { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" } ] @@ -3758,7 +3555,6 @@ "references": [ { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" } ] @@ -3817,42 +3613,34 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -3989,7 +3777,6 @@ "references": [ { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" } ] @@ -4087,42 +3874,34 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "https://myers-scott.com/", - "refsource": "MISC", "url": "https://myers-scott.com/" } ] @@ -4181,52 +3960,42 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -4324,42 +4093,34 @@ "references": [ { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Kevin Dickerson", - "refsource": "SONG", "url": "https://www.mora.com/posts/faq/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -4418,17 +4179,14 @@ "references": [ { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" } ] @@ -4565,12 +4323,10 @@ "references": [ { "name": "Katherine Carson", - "refsource": "SONG", "url": "http://www.barker.com/faq.htm" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" } ] @@ -4668,32 +4424,26 @@ "references": [ { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" } ] @@ -4791,37 +4541,30 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" } ] @@ -4880,37 +4623,30 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" } ] @@ -5008,37 +4744,30 @@ "references": [ { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Antonio Lee", - "refsource": "AGO", "url": "https://www.west-perez.com/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" } ] @@ -5175,7 +4904,6 @@ "references": [ { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" } ] @@ -5390,32 +5118,26 @@ "references": [ { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -5474,12 +5196,10 @@ "references": [ { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -5538,52 +5258,42 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "http://www.washington.org/category/author.html", - "refsource": "MISC", "url": "http://www.washington.org/category/author.html" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -5642,52 +5352,42 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -5785,52 +5485,42 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" } ] @@ -5889,32 +5579,26 @@ "references": [ { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "Crystal Baker", - "refsource": "INCREASE", "url": "https://smith.com/privacy.htm" } ] @@ -5973,37 +5657,30 @@ "references": [ { "name": "Danielle Roberts", - "refsource": "SPECIAL", "url": "http://arnold-rollins.com/" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "John Watson", - "refsource": "DEGREE", "url": "http://heath.com/terms.htm" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "Joseph Griffin", - "refsource": "GAS", "url": "https://brock-nguyen.org/category.html" } ] @@ -6062,42 +5739,34 @@ "references": [ { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" } ] @@ -6156,37 +5825,30 @@ "references": [ { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" } ] @@ -6245,57 +5907,46 @@ "references": [ { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Michelle Williams", - "refsource": "SONG", "url": "https://www.harris-rogers.org/category.html" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Emily Strickland", - "refsource": "SOMEBODY", "url": "http://www.smith-spears.com/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "https://myers-scott.com/", - "refsource": "MISC", "url": "https://myers-scott.com/" } ] @@ -6471,57 +6122,46 @@ "references": [ { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Justin Archer", - "refsource": "SOMEBODY", "url": "https://adkins.com/blog/blog/wp-content/login.html" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Megan Morales", - "refsource": "GAS", "url": "http://www.wright-white.com/posts/explore/tag/login/" }, { "name": "Alex Patterson", - "refsource": "DURING", "url": "http://www.rose-goodwin.com/main/explore/tag/home/" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" } ] @@ -6580,62 +6220,50 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Joshua Green", - "refsource": "INCREASE", "url": "https://www.stevens.net/" }, { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "Tiffany Roberts", - "refsource": "LIGHT", "url": "http://olson-aguirre.net/index.jsp" }, { "name": "Shelly Kane", - "refsource": "SOMEBODY", "url": "https://middleton.com/tag/category.html" }, { "name": "Becky Nelson", - "refsource": "AGO", "url": "https://www.summers.biz/search/categories/list/home.html" }, { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "https://kennedy.com/terms/", - "refsource": "MISC", "url": "https://kennedy.com/terms/" }, { "name": "Dustin Wells", - "refsource": "AGO", "url": "https://www.davis.org/" }, { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" } ] @@ -6694,27 +6322,22 @@ "references": [ { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "http://www.mclaughlin-leon.com/login.php", - "refsource": "MISC", "url": "http://www.mclaughlin-leon.com/login.php" } ] @@ -6773,37 +6396,30 @@ "references": [ { "name": "Dr. Heidi Harris", - "refsource": "SONG", "url": "http://www.mora.com/home/" }, { "name": "Susan Coleman", - "refsource": "INCREASE", "url": "http://www.harmon.com/" }, { "name": "Jocelyn Bailey", - "refsource": "SOMEBODY", "url": "https://www.rodriguez-martin.com/" }, { "name": "Jessica Griffin", - "refsource": "DURING", "url": "http://www.bush.biz/tag/explore/search/" }, { "name": "April Brandt", - "refsource": "SONG", "url": "https://www.logan.com/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Sarah Jennings", - "refsource": "AGO", "url": "https://powell.biz/author.htm" } ] @@ -6901,37 +6517,30 @@ "references": [ { "name": "https://small.biz/", - "refsource": "CONFIRM", "url": "https://small.biz/" }, { "name": "Robert Carter", - "refsource": "DURING", "url": "http://www.griffith-myers.com/about/" }, { "name": "Katherine Carson", - "refsource": "SONG", "url": "http://www.barker.com/faq.htm" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Rebecca Sims", - "refsource": "LIGHT", "url": "https://phillips-mcdonald.com/category/" }, { "name": "Jeremy Saunders", - "refsource": "INCREASE", "url": "http://www.lopez.org/" }, { "name": "Joshua Garrett", - "refsource": "HEALTH", "url": "http://www.hodges.com/app/list/faq/" } ] @@ -7029,42 +6638,34 @@ "references": [ { "name": "Diana Scott", - "refsource": "AGO", "url": "https://www.lane-wright.com/author/" }, { "name": "Briana Arias", - "refsource": "SONG", "url": "https://rodriguez-miller.net/faq/" }, { "name": "Jennifer Stevens", - "refsource": "HEALTH", "url": "http://carroll.com/" }, { "name": "Steven Arellano", - "refsource": "HEALTH", "url": "https://dixon.com/index.jsp" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" }, { "name": "Veronica Martin MD", - "refsource": "INCREASE", "url": "https://www.allen.net/" }, { "name": "Charles Ramirez", - "refsource": "GAS", "url": "https://jackson.com/register/" }, { "name": "Justin Brown", - "refsource": "GAS", "url": "http://www.adams-moore.com/" } ] @@ -7123,17 +6724,14 @@ "references": [ { "name": "Shane Johnson", - "refsource": "DURING", "url": "http://www.mitchell.org/" }, { "name": "Matthew Vargas", - "refsource": "INCREASE", "url": "https://rice.com/" }, { "name": "http://www.aguilar-garcia.com/", - "refsource": "MISC", "url": "http://www.aguilar-garcia.com/" } ] @@ -7231,12 +6829,10 @@ "references": [ { "name": "https://gonzalez.com/", - "refsource": "MISC", "url": "https://gonzalez.com/" }, { "name": "Anne Moore", - "refsource": "GAS", "url": "http://www.wallace.biz/" } ] @@ -7295,22 +6891,18 @@ "references": [ { "name": "Dustin Wallace", - "refsource": "SONG", "url": "https://rivera.net/home.asp" }, { "name": "https://collins.com/app/explore/explore/terms.php", - "refsource": "MISC", "url": "https://collins.com/app/explore/explore/terms.php" }, { "name": "Rebecca Garcia", - "refsource": "HEALTH", "url": "https://moore-burns.net/faq.php" }, { "name": "Lisa Garrison DVM", - "refsource": "DURING", "url": "http://www.newman-smith.com/about/" } ] @@ -7408,7 +7000,6 @@ "references": [ { "name": "Brian Singh", - "refsource": "SPECIAL", "url": "http://edwards-owens.biz/" } ] diff --git a/package-lock.json b/package-lock.json index 64bed715e..3a5568102 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cve-services", - "version": "2.3.0", + "version": "2.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cve-services", - "version": "2.3.0", + "version": "2.3.1", "license": "(CC0)", "dependencies": { "ajv": "^8.6.2", @@ -18194,4 +18194,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index e3bc27267..ff6de9f54 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cve-services", "author": "Automation Working Group", - "version": "2.3.0", + "version": "2.3.1", "license": "(CC0)", "devDependencies": { "@faker-js/faker": "^7.6.0", diff --git a/src/controller/cve.controller/cve.controller.js b/src/controller/cve.controller/cve.controller.js index 9c342b4ac..be59db650 100644 --- a/src/controller/cve.controller/cve.controller.js +++ b/src/controller/cve.controller/cve.controller.js @@ -566,6 +566,11 @@ async function updateCna (req, res, next) { const dateUpdated = (new Date()).toISOString() cveRecord.cveMetadata.dateUpdated = dateUpdated + // Update dataVersion to current schema version + if (cveRecord.dataVersion !== CONSTANTS.SCHEMA_VERSION) { + cveRecord.dataVersion = CONSTANTS.SCHEMA_VERSION + } + if (cveRecord.cveMetadata.state === CONSTANTS.CVE_STATES.REJECTED) { delete cveRecord.cveMetadata.dateRejected if (!cveRecord.cveMetadata.datePublished) { @@ -786,6 +791,10 @@ async function insertAdp (req, res, next) { // update cve record here const cveRecord = result.cve + // Update dataVersion to current schema version + if (cveRecord.dataVersion !== CONSTANTS.SCHEMA_VERSION) { + cveRecord.dataVersion = CONSTANTS.SCHEMA_VERSION + } if (cveRecord.cveMetadata.state === CONSTANTS.CVE_STATES.REJECTED) { return res.status(403).json(error.cveRecordRejected()) } diff --git a/src/swagger.js b/src/swagger.js index 6e938c25c..e412e0c95 100644 --- a/src/swagger.js +++ b/src/swagger.js @@ -14,7 +14,7 @@ const rejectedCreateCVERecord = require('../schemas/cve/rejected-create-cve-exam /* eslint-disable no-multi-str */ const doc = { info: { - version: '2.3.0', + version: '2.3.1', 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 \ diff --git a/test/schemas/5.0/CVE-2017-4024_published.json b/test/schemas/5.0/CVE-2017-4024_published.json index 368783842..b50a18705 100644 --- a/test/schemas/5.0/CVE-2017-4024_published.json +++ b/test/schemas/5.0/CVE-2017-4024_published.json @@ -1,6 +1,6 @@ { "dataType": "CVE_RECORD", - "dataVersion": "5.1", + "dataVersion": "5.0", "cveMetadata": { "cveId": "CVE-2017-4024", "assignerOrgId": "88c02595-c8f7-4864-a0e7-e09b3e1da691", diff --git a/test/unit-tests/cve/cveCnaContainerUpdateTest.js b/test/unit-tests/cve/cveCnaContainerUpdateTest.js index ab0ad0778..04dd04d26 100644 --- a/test/unit-tests/cve/cveCnaContainerUpdateTest.js +++ b/test/unit-tests/cve/cveCnaContainerUpdateTest.js @@ -10,7 +10,6 @@ app.use(express.urlencoded({ extended: false })) // Allows us to handle url enco const middleware = require('../../../src/middleware/middleware') app.use(middleware.createCtxAndReqUUID) -const nonExistentCveId = 'CVE-2020-1425' const cveIdPublished5 = 'CVE-2017-4024' const cveIdReserved = 'CVE-2017-5835' const url = process.env.NODE_ENV === 'staging' ? 'https://test.cve.org/' : 'https://cve.org/' // Used in updateCna response messages @@ -150,65 +149,6 @@ app.route('/cve-cna-positive-tests/:id') describe('Testing the PUT /cve/:id/cna endpoint in Cve Controller', () => { context('Negative Tests', () => { - it('should return 400 when cveId does not exist', (done) => { - chai.request(app) - .put(`/cve-cna-negative-tests/${nonExistentCveId}`) - .set(cveFixtures.secretariatHeader) - .send(cveCnaContainerFail) - .end((err, res) => { - if (err) { - done(err) - } - - expect(res).to.have.status(400) - expect(res).to.have.property('body').and.to.be.a('object') - const errObj = error.cveDne() - expect(res.body.error).to.equal(errObj.error) - expect(res.body.message).to.equal(errObj.message) - done() - }) - }) - - it('should return 403 when cveId does not belong to cveId owning org', (done) => { - const headers = Object.assign({}, cveFixtures.secretariatHeader) - headers['CVE-API-ORG'] = 'cisco' - chai.request(app) - .put(`/cve-cna-negative-tests/${cveIdPublished5}`) - .set(headers) - .send(cveCnaContainerFail) - .end((err, res) => { - if (err) { - done(err) - } - - expect(res).to.have.status(403) - expect(res).to.have.property('body').and.to.be.a('object') - const errObj = error.owningOrgDoesNotMatch() - expect(res.body.error).to.equal(errObj.error) - expect(res.body.message).to.equal(errObj.message) - done() - }) - }) - - it('should return 403 when cve record does not exist', (done) => { - chai.request(app) - .put(`/cve-cna-negative-tests/${cveIdReserved}`) - .set(cveFixtures.secretariatHeader) - .send(cveCnaContainerFail) - .end((err, res) => { - if (err) { - done(err) - } - - expect(res).to.have.status(403) - expect(res).to.have.property('body').and.to.be.a('object') - const errObj = error.cveRecordDne() - expect(res.body.error).to.equal(errObj.error) - expect(res.body.message).to.equal(errObj.message) - done() - }) - }) - it('should return 400 when cve record is not valid', (done) => { chai.request(app) .put(`/cve-cna-negative-tests/${cveIdPublished5}`) diff --git a/test/unit-tests/cve/insertAdpTest.js b/test/unit-tests/cve/insertAdpTest.js index 310b98aed..fd654a247 100644 --- a/test/unit-tests/cve/insertAdpTest.js +++ b/test/unit-tests/cve/insertAdpTest.js @@ -9,6 +9,7 @@ const adpContainer = require('../../schemas/5.0/adpContainerExample.json').adpCo const { CVE_INSERT_ADP } = require('../../../src/controller/cve.controller/cve.controller.js') const errors = require('../../../src/controller/cve.controller/error.js') const error = new errors.CveControllerError() +const constants = require('../../../src/constants').getConstants() const OrgRepository = require('../../../src/repositories/orgRepository.js') const CveIdRepository = require('../../../src/repositories/cveIdRepository.js') @@ -182,5 +183,12 @@ describe('Testing insertAdp function', () => { expect(res.json.args[0][0].updated.containers.adp[adpCount - 1].affected[0].vendor).to.equal('test') expect(res.json.args[0][0].updated.containers.adp[adpCount - 1]).to.not.deep.equal(adpCopy2) }) + + it('Should update dataVersion to current version', async () => { + await CVE_INSERT_ADP(req, res, next) + + expect(status.args[0][0]).to.equal(200) + expect(res.json.args[0][0].updated.dataVersion).to.equal(constants.SCHEMA_VERSION) + }) }) }) diff --git a/test/unit-tests/cve/updateCnaTest.js b/test/unit-tests/cve/updateCnaTest.js new file mode 100644 index 000000000..7b7beda39 --- /dev/null +++ b/test/unit-tests/cve/updateCnaTest.js @@ -0,0 +1,148 @@ +const chai = require('chai') +const sinon = require('sinon') +const { faker } = require('@faker-js/faker') +const _ = require('lodash') +const expect = chai.expect +const cveIdPublished5 = 'CVE-2017-4024' +const cveRecordPublished = require('../../schemas/5.0/CVE-2017-4024_published.json') +const cnaContainer = require('../../schemas/cna-container/cna-container_pass.json') +const { CVE_UPDATE_CNA } = require('../../../src/controller/cve.controller/cve.controller.js') +const errors = require('../../../src/controller/cve.controller/error.js') +const error = new errors.CveControllerError() +const constants = require('../../../src/constants').getConstants() +const Cve = require('../../../src/model/cve.js') + +const cnaUUID = faker.datatype.uuid() + +const stubCnaOrg = { + short_name: 'CnaOrg', + name: 'test_cna', + UUID: cnaUUID, + authority: { + active_roles: [ + 'CNA' + ] + } +} + +const stubCnaUser = { + username: 'testCnaUser', + org_UUID: cnaUUID, + UUID: faker.datatype.uuid() +} + +const stubCveId = { + requested_by: { + cna: 'CnaOrg', + user: 'testCnaUser' + }, + cve_id: 'CVE-2017-4024', + cve_year: '2017', + state: 'PUBLISHED', + owning_cna: cnaUUID, + reserved: '2023-05-17T16:57:35.698Z' +} + +describe('updateCna function', () => { + let req + let res + let next + let status + let json + let cveRepo + let cveIdRepo + let orgRepo + let userRepo + let getCveRepository + let getCveIdRepository + let getUserRepository + let getOrgRepository + let cveCopy + let cnaContainerCopy + + beforeEach(() => { + status = sinon.stub() + json = sinon.spy() + res = { json, status } + next = sinon.spy() + status.returns(res) + cveCopy = _.cloneDeep(cveRecordPublished) + cnaContainerCopy = _.cloneDeep(cnaContainer) + + sinon.stub(Cve, 'validateCveRecord').returns({ isValid: true }) + orgRepo = { getOrgUUID: sinon.stub(), isSecretariat: sinon.stub() } + orgRepo.getOrgUUID.returns(stubCnaOrg.UUID) + orgRepo.isSecretariat.returns(false) + getOrgRepository = sinon.stub() + getOrgRepository.returns(orgRepo) + + userRepo = { getUserUUID: sinon.stub() } + userRepo.getUserUUID.returns(stubCnaUser.UUID) + getUserRepository = sinon.stub() + getUserRepository.returns(userRepo) + + cveRepo = { findOneByCveId: sinon.stub(), updateByCveId: sinon.stub() } + cveRepo.findOneByCveId.returns({ cve: cveCopy }) + cveRepo.updateByCveId.returns(true) + getCveRepository = sinon.stub() + getCveRepository.returns(cveRepo) + + cveIdRepo = { findOneByCveId: sinon.stub() } + cveIdRepo.findOneByCveId.returns(stubCveId) + getCveIdRepository = sinon.stub() + getCveIdRepository.returns(cveIdRepo) + + req = { + ctx: { + org: stubCnaOrg.short_name, + uuid: stubCnaOrg.UUID, + params: { + id: cveIdPublished5 + }, + repositories: { + getOrgRepository, + getUserRepository, + getCveRepository, + getCveIdRepository + }, + body: { + cnaContainer: cnaContainerCopy + } + } + } + }) + + afterEach(() => { + sinon.restore() + }) + + it('should return 400 when the CVE-ID does not exist', async () => { + cveIdRepo.findOneByCveId.returns(null) + + await CVE_UPDATE_CNA(req, res, next) + + expect(status.args[0][0]).to.equal(400) + expect(res.json.args[0][0].message).to.equal(error.cveDne().message) + }) + it('should return 403 if calling user org is not secretariat and does not match CVE org, ', async () => { + orgRepo.getOrgUUID.returns('bad id') + await CVE_UPDATE_CNA(req, res, next) + + expect(status.args[0][0]).to.equal(403) + expect(res.json.args[0][0].message).to.equal(error.owningOrgDoesNotMatch().message) + }) + it('should return 400 when the CVE record does not exist', async () => { + cveRepo.findOneByCveId.returns(null) + await CVE_UPDATE_CNA(req, res, next) + + expect(status.args[0][0]).to.equal(403) + expect(res.json.args[0][0].message).to.equal(error.cveRecordDne().message) + }) + it('should update dataVersion to current schema if existing record was last updating against previous schema', async () => { + await CVE_UPDATE_CNA(req, res, next) + + expect(status.args[0][0]).to.equal(200) + expect(res.json.args[0][0].message).to.include(' record was successfully updated. This submission should appear on ') + expect(res.json.args[0][0].updated.dataVersion).to.equal(constants.SCHEMA_VERSION) + }) +})