Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
462b828
Merge pull request #2104 from CVEProject/dr_fixing_transactions
jdalphond-mitre Dec 1, 2026
f1a8c03
fix: upgrade the xlsx development dependency to 0.20.3
Nov 30, 2026
7a4e81d
chore: remove the Monday migration and xlsx dependency
Dec 1, 2026
ed277b4
Merge pull request #2101 from CVEProject/dr_xlsx_update
david-rocca Dec 1, 2026
e42555a
fix: replace depcheck with Knip and patch nested uuid dependencies
Nov 30, 2026
4288abd
Merge pull request #2102 from CVEProject/db_moderate_findings_20263011
david-rocca Dec 1, 2026
2782fc3
fix: update and pin Node and Python container images
Nov 30, 2026
b713e89
test: allow 10 seconds for legacy organization role transitions
Dec 1, 2026
010284f
Merge pull request #2103 from CVEProject/dr_container_updates_20263011
david-rocca Dec 1, 2026
879c950
Bump cross-spawn from 7.0.6 to 7.1.2
dependabot[bot] Dec 1, 2026
5503a4a
Merge pull request #2106 from CVEProject/dependabot/npm_and_yarn/cros…
david-rocca Dec 1, 2026
d695b20
Root read impl
Oct 26, 2026
a5446ab
Root users should be able to pull user lists like orgs now
Nov 3, 2026
fd37cfe
Also return their org
Nov 3, 2026
27aed77
fixing the org responses
Nov 11, 2026
ec6a1a4
Manage users
Nov 16, 2026
cde2025
Allow Root admins to grant and revoke ADMIN in descendant organizations
Nov 23, 2026
068f42c
docs: clarify Root inclusion in registry organization pagination
Nov 23, 2026
2a67024
test: allow time for Root oversight fixture setup and teardown
Nov 23, 2026
c078369
test: allow time for Root oversight reassignment checks
Nov 23, 2026
8399cbd
Allow Root admins to edit descendant user profiles and reset API secrets
Nov 23, 2026
f4dd7be
Merge pull request #2097 from CVEProject/dr_root_implementation
david-rocca Nov 30, 2026
46de2d0
Bump CVE Services version to 2.10.0
Dec 1, 2026
594a2a3
Merge pull request #2107 from CVEProject/2.10.0-release
david-rocca Dec 2, 2026
15b10c7
Hide descendant CNA conversations from Root users and admins
Dec 3, 2026
c9aecfe
Allow 30 seconds for advisory location migration tests
Dec 3, 2026
be47745
Merge pull request #2108 from CVEProject/dr_hide_messages_from_root
david-rocca Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Please consult our [SECURITY.md](SECURITY.md) for specific instructions on repor

This project uses:

- [Node.js](https://nodejs.org/) 24.22.1 for local development and the production image build; CI and the development Docker image use Node.js 24.
- [Node.js](https://nodejs.org/) 24.22.3 for local development and the production image build; CI and the development Docker image use Node.js 24.
- [Express](https://github.com/expressjs)
- [MongoDB](https://www.mongodb.com/) replica sets for local development and testing
- [Amazon DocumentDB](https://aws.amazon.com/documentdb/) in production
Expand Down Expand Up @@ -85,7 +85,7 @@ See the [Docker README](docker/README.md) to run both the application and MongoD

##### Install dependencies

Install Node.js 24.22.1 with its bundled npm, then install the application and migration dependencies:
Install Node.js 24.22.3 with its bundled npm, then install the application and migration dependencies:

```sh
npm ci
Expand Down Expand Up @@ -197,6 +197,42 @@ The default local port is `8081`, configurable with `PORT`. Swagger UI is availa
to the database. API routes use the `/api/` prefix. The example `TEST_PORT=3001` gives the
integration suite a separate listener port. The full Docker setup uses port `3000`.

### Root demo accounts

Running `npm run populate:dev` resets the local development database and creates these active accounts:

| Organization | Ordinary user | Administrator |
| --- | --- | --- |
| `top_root_1` | `top_root_1_user@demo.test` | `top_root_1_admin@demo.test` |
| `root_1_4` | `root_1_4_user@demo.test` | `root_1_4_admin@demo.test` |

All four accounts use the existing `LOCAL_KEY` API secret configured for local population. The population command prints this key. Administrators belong to both their organization's `users` and `admins` lists; ordinary users belong only to `users`.

The demo hierarchy includes `top_root_1` → `root_1_4` → `window_1`. Both account types can read descendant organizations and users. With the local server running, replace `YOUR_LOCAL_KEY` with the printed secret to try an expanded organization read:

```sh
curl 'http://localhost:8081/api/registry/org/window_1?expand=users' \
-H 'CVE-API-ORG: top_root_1' \
-H 'CVE-API-USER: top_root_1_user@demo.test' \
-H 'CVE-API-KEY: YOUR_LOCAL_KEY'
```

Use the organization and username from either row above to try these requests:

| Request | Expected result |
| --- | --- |
| `GET /api/registry/org` | The flat list and its pagination totals include the requesting Root and all its direct and indirect descendants. |
| `GET /api/registry/org-hierarchy` | The requesting Root's subtree, with its ancestor path for context. |
| `GET /api/registry/org/window_1` | The descendant organization's details. |
| `GET /api/registry/org/window_1?expand=users` | The descendant organization with expanded user metadata. |
| `GET /api/registry/org/window_1/users` | Users belonging to `window_1`. |
| `GET /api/registry/org/window_1/user/ashleyruiz@window_1.com` | The specified descendant user. |
| `GET /api/registry/org/top_root_2` | `403`: outside both Roots' oversight. |

The `top_root_1` accounts can also read `root_1_4` and its users. The `root_1_4` accounts receive `403` when reading ancestor organization `top_root_1` or sibling Root `root_1_3`. Organization lists exclude those records as well. Secretariat continues to receive the complete organization list.

Both demo administrators can grant or revoke `ADMIN` for users in `window_1`. Send `POST /api/registry/org/window_1/user/{username}/grant-role` or `POST /api/registry/org/window_1/user/{username}/revoke-role` with the JSON body `{"role":"ADMIN"}`. This permission covers the administrator's own Root and all its direct and indirect descendants. Attempting to revoke one's own `ADMIN` role returns `403`.

### API Documentation

Use the Swagger documentation for the instance you are calling:
Expand Down
54 changes: 27 additions & 27 deletions api-docs/openapi.json

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions datadump/pre-population/root-orgs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"name": "Top Level Root 1",
"short_name": "top_root_1",
"is_top_level_root": true,
"oversees": ["root_1_1", "root_1_2", "root_1_3", "root_1_4"]
"oversees": ["root_1_1", "root_1_2", "root_1_3", "root_1_4"],
"users": [
"20000000-0000-4000-8000-000000000062",
"20000000-0000-4000-8000-000000000063"
],
"admins": ["20000000-0000-4000-8000-000000000063"]
},
{
"authority": { "active_roles": ["ROOT"] },
Expand Down Expand Up @@ -53,7 +58,12 @@
"name": "Root 1.4",
"short_name": "root_1_4",
"is_top_level_root": false,
"oversees": []
"oversees": [],
"users": [
"20000000-0000-4000-8000-000000000064",
"20000000-0000-4000-8000-000000000065"
],
"admins": ["20000000-0000-4000-8000-000000000065"]
},
{
"authority": { "active_roles": ["ROOT"] },
Expand Down
44 changes: 44 additions & 0 deletions datadump/pre-population/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -791,5 +791,49 @@
"status": "active",
"created": "2021-05-11T15:07:20.674347Z",
"last_updated": "2021-05-11T15:07:20.674347Z"
},
{
"UUID": "20000000-0000-4000-8000-000000000062",
"username": "top_root_1_user@demo.test",
"name": {
"first": "Top Root 1",
"last": "User"
},
"status": "active",
"created": "2021-05-11T15:07:20.674347Z",
"last_updated": "2021-05-11T15:07:20.674347Z"
},
{
"UUID": "20000000-0000-4000-8000-000000000063",
"username": "top_root_1_admin@demo.test",
"name": {
"first": "Top Root 1",
"last": "Administrator"
},
"status": "active",
"created": "2021-05-11T15:07:20.674347Z",
"last_updated": "2021-05-11T15:07:20.674347Z"
},
{
"UUID": "20000000-0000-4000-8000-000000000064",
"username": "root_1_4_user@demo.test",
"name": {
"first": "Root 1.4",
"last": "User"
},
"status": "active",
"created": "2021-05-11T15:07:20.674347Z",
"last_updated": "2021-05-11T15:07:20.674347Z"
},
{
"UUID": "20000000-0000-4000-8000-000000000065",
"username": "root_1_4_admin@demo.test",
"name": {
"first": "Root 1.4",
"last": "Administrator"
},
"status": "active",
"created": "2021-05-11T15:07:20.674347Z",
"last_updated": "2021-05-11T15:07:20.674347Z"
}
]
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:24.22.1-trixie-slim@sha256:43b9ba1142b8dcf33fa8f922ca1be85714adc444e0586c7cf7726daaeabc1bea AS build
FROM node:24.22.3-trixie-slim@sha256:4d00acb4bcc42c454c4eb801526f7ad7f772ea3bd4fd168c5cc2e384abcbb9d4 AS build

LABEL \
mitre.name=cveawg \
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN node src/swagger.js \
&& npm prune --omit=dev \
&& npm cache clean --force

FROM gcr.io/distroless/nodejs24-debian13:nonroot@sha256:cb606325b7ec4af55462cb0b424a53b452a5b4a894ffe841fcf1048d216fb9f8 AS runtime
FROM gcr.io/distroless/nodejs24-debian13:nonroot-d80a5ba65a6abbacd7f441962bdba2ab57e81379@sha256:675c532423b908f9e56f9d60a4e62309b63cd2a3175acb90a46b96f7ee68e121 AS runtime

LABEL \
mitre.name=cveawg \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:24-alpine3.22
FROM node:24.22.3-alpine3.24@sha256:116b800c3754b440ee0aa3ed2f20f5bf3d99a554bfd9adeea09ea8017f6e85f5
# do not copy files we mount in compose
# our local and production docker files could co-exist using "targets" in
# the `FROM` statements
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ show `Serving on port 3000`; press Ctrl+C to leave the log view. Open Swagger UI
[http://localhost:3000/api-docs/](http://localhost:3000/api-docs/).

The Compose application uses [Dockerfile.dev](Dockerfile.dev), based on Node.js 24. The
separate [production Dockerfile](Dockerfile) builds with Node.js 24.22.1 and uses a
separate [production Dockerfile](Dockerfile) builds with Node.js 24.22.3 and uses a
Distroless Node.js 24 runtime. Shell, population, and test commands in this guide apply
to the development image.

Expand Down
Loading
Loading