Skip to content
6 changes: 3 additions & 3 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.2",
"info": {
"version": "2.9.3",
"version": "2.9.4",
"title": "CVE Services API",
"description": "The CVE Services API supports automation tooling for the CVE Program. Credentials are required for most service endpoints. Representatives of <a href='https://www.cve.org/ProgramOrganization/CNAs'>CVE Numbering Authorities (CNAs)</a> should use one of the methods below to obtain credentials: <ul><li>If your organization already has an Organizational Administrator (OA) account for the CVE Services, ask your admin for credentials</li> <li>Contact your Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/Google'>Google</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/INCIBE'>INCIBE</a>, <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/jpcert'>JPCERT/CC</a>, or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/redhat'>Red Hat</a>) or Top-Level Root (<a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/icscert'>CISA ICS</a> or <a href='https://www.cve.org/PartnerInformation/ListofPartners/partner/mitre'>MITRE</a>) to request credentials </ul> <p>CVE data is to be in the JSON 5.2 CVE Record format. Details of the JSON 5.2 schema are located <a href='https://github.com/CVEProject/cve-schema/releases/tag/v5.2.0' target='_blank'>here</a>.</p> <a href='https://cveform.mitre.org/' class='link' target='_blank'>Contact the CVE Services team</a>",
"contact": {
Expand Down Expand Up @@ -3810,7 +3810,7 @@
"Data Registry — Organizations"
],
"summary": "Updates information about the organization specified by short name (accessible to Secretariat or same-organization Admin)",
"description": " <p><b>Related legacy endpoint:</b> <a href='#/Legacy%20%E2%80%94%20Organizations/orgUpdateSingle'>PUT /org/{shortname}</a>. This endpoint accepts a JSON request body and allows organization admins to request changes, with joint approval for designated fields. The legacy endpoint uses query parameters and requires Secretariat access.</p> <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role or be an <b>Admin</b> of the requested organization.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p>Users cannot remove SECRETARIAT authority from their own organization. Another Secretariat organization must perform the demotion. Self-demotion returns 403 SECRETARIAT_CANNOT_SELF_DEMOTE.</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <p>Organizations whose only role is ROOT have an ID quota of zero. An approved change to ROOT resets the quota to zero, even when the request omits it.</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>is_top_level_root</li> <li>is_last_resort</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
"description": " <p><b>Related legacy endpoint:</b> <a href='#/Legacy%20%E2%80%94%20Organizations/orgUpdateSingle'>PUT /org/{shortname}</a>. This endpoint accepts a JSON request body and allows organization admins to request changes, with joint approval for designated fields. The legacy endpoint uses query parameters and requires Secretariat access.</p> <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role or be an <b>Admin</b> of the requested organization.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Partial joint approval:</b> Secretariat users may supply <code>x_unresolved_keys</code>, an array of unique pending field paths such as <code>[&quot;industry&quot;, &quot;contact_info.emails&quot;]</code>. The full organization body is still required. Listed fields retain their published values and original proposed values remain in the same pending review. Other fields use the submitted values, so denied fields must contain their published values. The response retains the existing message/updated envelope and reports that joint approval is still required.</p> <p>Omitting this metadata or supplying an empty array retains existing whole-review approval/rejection behavior. Nonempty lists require a pending review and actual proposed changes. Arrays resolve as a whole; use <code>short_name</code> for a deferred rename, including when <code>new_short_name</code> is supplied. Unsupported, unchanged, or overlapping paths return 400. Resolve dependent role and quota changes together; updates that cannot preserve an unresolved value return 400 and roll back. Relationship fields <code>reports_to</code>, <code>oversees</code>, and <code>top_level_root</code> are excluded. Any supplied metadata from a non-Secretariat user returns 403.</p> <p>Users cannot remove SECRETARIAT authority from their own organization. Another Secretariat organization must perform the demotion. Self-demotion returns 403 SECRETARIAT_CANNOT_SELF_DEMOTE.</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <p>Organizations whose only role is ROOT have an ID quota of zero. An approved change to ROOT resets the quota to zero, even when the request omits it.</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>is_top_level_root</li> <li>is_last_resort</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
"operationId": "registryOrgUpdateSingle",
"parameters": [
{
Expand Down Expand Up @@ -4553,7 +4553,7 @@
"Data Registry — Organizations"
],
"summary": "Assigns an organization to report to a ROOT organization (accessible to Secretariat only)",
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role.</p> <h2>Expected Behavior</h2> <p>The organization identified by <b>shortname</b> must have <b>ROOT</b> authority. The organization identified by <b>shortname2</b> will report to it. If <b>shortname2</b> already reported to a different <b>ROOT</b>. It will be removed from that and both will receive an audit entry.</p>",
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role.</p> <h2>Expected Behavior</h2> <p>The organization identified by <b>shortname</b> must have <b>ROOT</b> authority. The organization identified by <b>shortname2</b> will report to it. If <b>shortname2</b> already reported to a different <b>ROOT</b>, it will be removed from that Root. Audit entries capture the final relationship state for changed parents and any organizations whose derived top_level_root or _hierarchy changes.</p>",
"operationId": "registryOrgAddOverseeRelationship",
"parameters": [
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cve-services",
"author": "Automation Working Group",
"version": "2.9.3",
"version": "2.9.4",
"license": "(CC0)",
"devDependencies": {
"@faker-js/faker": "^10.5.0",
Expand Down
6 changes: 3 additions & 3 deletions schemas/Audit.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"audit_object": {
"type": "object",
"description": "Complete snapshot of the organization object after the change"
"description": "Snapshot of the organization after the change. Automatically generated snapshots of persisted organizations include the derived top_level_root when available and _hierarchy at the time of the change. Older or manually supplied entries may omit these fields."
},
"change_author": {
"$ref": "#/definitions/uuidType",
Expand All @@ -50,7 +50,7 @@
},
"history": {
"type": "array",
"description": "Array of audit history entries, ordered chronologically",
"description": "Array of audit history entries, ordered chronologically, including changes to an organization's derived relationships caused by other organizations",
"items": {
"$ref": "#/definitions/historyEntry"
},
Expand All @@ -61,4 +61,4 @@
"target_uuid"
],
"additionalProperties": false
}
}
35 changes: 35 additions & 0 deletions schemas/registry-org/update-registry-org-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,41 @@
"body"
],
"description": "Optional message accompanying the organization update"
},
"x_unresolved_keys": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"short_name",
"long_name",
"authority",
"aliases",
"is_top_level_root",
"is_last_resort",
"charter_or_scope",
"product_list",
"disclosure_policy",
"contact_info",
"partner_role_type",
"partner_number",
"partner_country",
"program_data.cve_website_update_date",
"program_data.cve_website_update_needed",
"program_data.status",
"advisory_locations",
"advisory_location_require_credentials",
"vulnerability_advisory_location_for_web_scraping",
"industry",
"tl_root_start_date",
"is_cna_discussion_list",
"id_quota",
"contact_info.emails",
"contact_info.websites"
]
},
"description": "Secretariat-only unresolved pending proposal paths. A nonempty list preserves the published values of these fields and keeps the same review pending with its original proposals. Other fields follow the submitted full organization body. Arrays are atomic; overlapping paths are invalid. Use short_name for a deferred rename. Omitted metadata or an empty list retains existing whole-review approval/rejection behavior; an empty list does not require a pending review. Updates that cannot preserve an unresolved published value are rejected and rolled back; resolve dependent role and quota changes together."
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/review/review.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"new_review_data": {
"type": "object",
"description": "The data proposed in the review"
"description": "The data proposed in the review. Pending review GET responses omit null fields when the published value is also null or absent, matching organization responses. A proposed null is retained when it clears a published value. Stored proposals and completed review history are unchanged."
},
"created": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion src/controller/registry.controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,8 @@ router.put('/registry/org/:shortname',
<h2>Expected Behavior</h2>
<b>This endpoint expects a full organization object in the request body.</b>
<p><b>Secretariat:</b> Updates any organization's information</p>
<p><b>Partial joint approval:</b> Secretariat users may supply <code>x_unresolved_keys</code>, an array of unique pending field paths such as <code>[&quot;industry&quot;, &quot;contact_info.emails&quot;]</code>. The full organization body is still required. Listed fields retain their published values and original proposed values remain in the same pending review. Other fields use the submitted values, so denied fields must contain their published values. The response retains the existing message/updated envelope and reports that joint approval is still required.</p>
<p>Omitting this metadata or supplying an empty array retains existing whole-review approval/rejection behavior. Nonempty lists require a pending review and actual proposed changes. Arrays resolve as a whole; use <code>short_name</code> for a deferred rename, including when <code>new_short_name</code> is supplied. Unsupported, unchanged, or overlapping paths return 400. Resolve dependent role and quota changes together; updates that cannot preserve an unresolved value return 400 and roll back. Relationship fields <code>reports_to</code>, <code>oversees</code>, and <code>top_level_root</code> are excluded. Any supplied metadata from a non-Secretariat user returns 403.</p>
<p>Users cannot remove SECRETARIAT authority from their own organization. Another Secretariat organization must perform the demotion. Self-demotion returns 403 SECRETARIAT_CANNOT_SELF_DEMOTE.</p>
<p><b>Organization Admin:</b> Requests changes to its organization's information</p>
<p>Organizations whose only role is ROOT have an ID quota of zero. An approved change to ROOT resets the quota to zero, even when the request omits it.</p>
Expand Down Expand Up @@ -878,6 +880,7 @@ router.put('/registry/org/:shortname',
mw.useRegistry(),
mw.validateUser,
// mw.onlySecretariat,
body('x_unresolved_keys').optional().custom(value => Array.isArray(value) && value.every(path => typeof path === 'string' && path.length > 0) && new Set(value).size === value.length).withMessage('x_unresolved_keys must be an array of unique nonempty field paths.'),
body('user_quota').optional().custom(value => Number.isSafeInteger(value) && value >= 0).withMessage('user_quota must be a nonnegative safe integer.'),
parseError,
parsePutParams,
Expand Down Expand Up @@ -1339,7 +1342,7 @@ router.post('/registry/org/:shortname/oversees/:shortname2/add',
<p>User must belong to an organization with the <b>Secretariat</b> role.</p>
<h2>Expected Behavior</h2>
<p>The organization identified by <b>shortname</b> must have <b>ROOT</b> authority. The organization identified by <b>shortname2</b> will
report to it. If <b>shortname2</b> already reported to a different <b>ROOT</b>. It will be removed from that and both will receive an audit entry.</p>'
report to it. If <b>shortname2</b> already reported to a different <b>ROOT</b>, it will be removed from that Root. Audit entries capture the final relationship state for changed parents and any organizations whose derived top_level_root or _hierarchy changes.</p>'
#swagger.parameters['shortname'] = { description: 'The shortname of the overseeing ROOT organization' }
#swagger.parameters['shortname2'] = { description: 'The shortname of the reporting organization' }
#swagger.parameters['$ref'] = [
Expand Down
Loading
Loading