Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1590597
New stuff from staging
david-rocca Jul 13, 2026
4c69040
#1843 Use field projections for orgs and users in getFilteredCveId
ChenyangLi4288 Jul 13, 2026
00df2d5
Add local Mongo replica cluster for integration tests
jdalphond-mitre Jul 13, 2026
9250c39
Merge pull request #1914 from CVEProject/dr_dev_merged_with_staging
jdaigneau5 Jul 13, 2026
7c8b577
Add environment-configurable Postman registry tests
jdalphond-mitre Jul 13, 2026
1dbc06a
Fix user UUID lookup option forwarding
afoote-mitre Jul 2, 2026
ddfce24
Fix auth context prototype method detection
afoote-mitre Jul 2, 2026
40b7c34
Fix legacy org selected short name lookup
afoote-mitre Jul 2, 2026
12b44e0
Fix CVE rejection test requester lookup
afoote-mitre Jul 2, 2026
755c28b
Merge pull request #1904 from CVEProject/af-1901
david-rocca Jul 15, 2026
abdd851
Bump morgan from 1.10.1 to 1.11.0
dependabot[bot] Jul 15, 2026
4caf5f4
Merge pull request #1913 from CVEProject/dependabot/npm_and_yarn/morg…
david-rocca Jul 15, 2026
b0dd4a6
Merge branch 'dev' into jd_postman_tests
david-rocca Jul 15, 2026
3108900
Merge pull request #1931 from CVEProject/jd_postman_tests
david-rocca Jul 15, 2026
107ac1b
Merge branch 'dev' into jd_docdb_topology
david-rocca Jul 15, 2026
8f28c9f
Merge branch 'dev' into issue-1843-projection-cve-id-filter
david-rocca Jul 15, 2026
c4f3d58
Protect existing production by only using MONGO_CONN_STRING in develo…
jdalphond-mitre Jul 15, 2026
08f91d6
Better env check
jdalphond-mitre Jul 15, 2026
d4afca6
Merge pull request #1915 from CVEProject/jd_docdb_topology
david-rocca Jul 15, 2026
c609aaa
Assert getAllOrgs and getAllUsers are called with the expected field …
Jul 16, 2026
e1dd83e
Merge branch 'dev' into issue-1843-projection-cve-id-filter
david-rocca Jul 16, 2026
e0e601b
remove legacy registry=true support
david-rocca Jul 20, 2026
9643c41
Clean up of unused endpoints
david-rocca Jul 20, 2026
85b293a
Remove unused middleware helpers
Jul 22, 2026
c60fd4f
Merge pull request #1916 from ChenyangLi4288/issue-1843-projection-cv…
david-rocca Jul 23, 2026
bab91ee
Merge pull request #1935 from CVEProject/cleanup/dr_1928
jdalphond-mitre Jul 23, 2026
983522d
Merge pull request #1937 from CVEProject/cleanup/dr_1930
jdalphond-mitre Jul 23, 2026
fba7fd3
Align user format flag semantics
Jul 24, 2026
b486aa8
Add Secretariat endpoints for ROOT organization reports-to management
jdalphond-mitre Jul 29, 2026
0b3dccb
Fixing lint issues
jdalphond-mitre Jul 29, 2026
cc9bbc6
Merge pull request #1950 from CVEProject/jd_1933
jdaigneau5 Jul 29, 2026
909b931
Merge pull request #1940 from Ewgna/bugfix/1921-remove-unused-middleware
jdalphond-mitre Aug 4, 2026
43fa07e
Copying in @Ewgna fixes #1918 but without the rebase.
jdalphond-mitre Aug 4, 2026
d72e27a
Merge pull request #1951 from CVEProject/jd_1939
jdalphond-mitre Aug 4, 2026
bafdc94
Add user format flag semantics test
Aug 5, 2026
cf6cfb8
Merge branch '2.8.4-release' into bugfix/standardize-format-flags
jdalphond-mitre Aug 5, 2026
0dac8c1
Update org.registry.controller.js
jdalphond-mitre Aug 5, 2026
b406855
Merge pull request #1948 from Ewgna/bugfix/standardize-format-flags
jdalphond-mitre Aug 5, 2026
23d2bce
Merge pull request #1952 from CVEProject/2.8.4-release
jdalphond-mitre Aug 5, 2026
6938896
Updating postman tests to also run through legacy endpoints
jdalphond-mitre Aug 6, 2026
df7891e
Merge pull request #1957 from CVEProject/jd_update_postman
jdaigneau5 Aug 7, 2026
39c631e
Updating version numbers and some dependencies
jdalphond-mitre Aug 10, 2026
9ebc5bd
Merge pull request #1959 from CVEProject/jd_prep_for_test
jdaigneau5 Aug 10, 2026
8447c79
Merge branch 'master' into dev
jdalphond-mitre Aug 13, 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
1,492 changes: 925 additions & 567 deletions api-docs/openapi.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docker/.docker-env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
LOCAL_KEY=TCF25YM-39C4H6D-KA32EGF-V5XSHN3
MONGO_CONN_STRING=mongodb://docdb:27017,docdb-read-1:27017,docdb-read-2:27017/cve_dev?replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false
MONGO_HOST=docdb
MONGO_PORT=27017
NODE_ENV=development
Expand Down
1 change: 1 addition & 0 deletions docker/.docker-env.int-example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
MONGO_CONN_STRING=mongodb://docdb:27017,docdb-read-1:27017,docdb-read-2:27017/cve_int?replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false
MONGO_HOST=docdb
MONGO_PORT=27017
NODE_ENV=integration
Expand Down
30 changes: 30 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,36 @@ See the [API documentation](https://github.com/CVEProject/cve-services#api-docum

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

### Run the Mongo Replica Cluster Only

The Mongo-only compose file starts one primary and two replica members without starting the CVE Services app. By default it uses `mongo:5.0`.

```bash
cd docker/
docker compose -f docker-compose.mongo-cluster.yml up -d docdb docdb-read-1 docdb-read-2 mongo-init
```

Use this connection string from the host, including MongoDB Compass:

```text
mongodb://localhost:27017,localhost:27018,localhost:27019/cve_test?replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false
```

To run the same local replica topology with Mongo 8, override the image:

```bash
cd docker/
MONGO_IMAGE=mongo:8.0 docker compose -f docker-compose.mongo-cluster.yml up -d --force-recreate docdb docdb-read-1 docdb-read-2 mongo-init
```

If you already created the local volumes with Mongo 5, Mongo 8 may fail to start against those files. For a fresh Mongo 8 local cluster, remove the Mongo-only volumes first. This deletes local Mongo data for this compose file:

```bash
cd docker/
docker compose -f docker-compose.mongo-cluster.yml down -v
MONGO_IMAGE=mongo:8.0 docker compose -f docker-compose.mongo-cluster.yml up -d docdb docdb-read-1 docdb-read-2 mongo-init
```

## Running unit tests

You can run unit tests using the docker image by running the following command:
Expand Down
132 changes: 132 additions & 0 deletions docker/docker-compose.mongo-cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
services:
docdb:
image: ${MONGO_IMAGE:-mongo:5.0}
container_name: mongo
ports:
- "27017:27017"
- "27018:27018"
- "27019:27019"
volumes:
- docdb-host-data:/data/db
command: ["mongod", "--replSet", "rs0", "--bind_ip_all", "--port", "27017"]
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --port 27017 --eval 'db.adminCommand({ ping: 1 }).ok' || exit 1"]
interval: 10s
timeout: 10s
retries: 12
start_period: 30s

docdb-read-1:
image: ${MONGO_IMAGE:-mongo:5.0}
container_name: mongo-read-1
network_mode: "service:docdb"
depends_on:
docdb:
condition: service_healthy
volumes:
- docdb-host-read-1-data:/data/db
command: ["mongod", "--replSet", "rs0", "--bind_ip_all", "--port", "27018"]
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --port 27018 --eval 'db.adminCommand({ ping: 1 }).ok' || exit 1"]
interval: 10s
timeout: 10s
retries: 12
start_period: 30s

docdb-read-2:
image: ${MONGO_IMAGE:-mongo:5.0}
container_name: mongo-read-2
network_mode: "service:docdb"
depends_on:
docdb:
condition: service_healthy
volumes:
- docdb-host-read-2-data:/data/db
command: ["mongod", "--replSet", "rs0", "--bind_ip_all", "--port", "27019"]
healthcheck:
test: ["CMD-SHELL", "mongosh --quiet --port 27019 --eval 'db.adminCommand({ ping: 1 }).ok' || exit 1"]
interval: 10s
timeout: 10s
retries: 12
start_period: 30s

mongo-init:
image: ${MONGO_IMAGE:-mongo:5.0}
network_mode: "service:docdb"
depends_on:
docdb:
condition: service_healthy
docdb-read-1:
condition: service_healthy
docdb-read-2:
condition: service_healthy
command: >
sh -c "
mongosh --host localhost --port 27017 --eval '
const desiredConfig = {
_id: \"rs0\",
members: [
{ _id: 0, host: \"localhost:27017\", priority: 2 },
{ _id: 1, host: \"localhost:27018\", priority: 1 },
{ _id: 2, host: \"localhost:27019\", priority: 1 }
]
};

function memberKey(member) {
return member._id + \":\" + member.host + \":\" + (member.priority ?? 1);
}

function configMatches(currentConfig) {
const currentMembers = currentConfig.members.map(memberKey).sort().join(\"|\");
const desiredMembers = desiredConfig.members.map(memberKey).sort().join(\"|\");
return currentConfig._id === desiredConfig._id && currentMembers === desiredMembers;
}

try {
rs.status();
const currentConfig = rs.conf();
if (configMatches(currentConfig)) {
print(\"Replica set already initialized with the expected localhost members.\");
} else {
print(\"Updating replica set members...\");
rs.reconfig({ ...desiredConfig, version: currentConfig.version + 1 });
}
} catch (e) {
if (e.codeName == \"NotYetInitialized\") {
print(\"Initiating replica set...\");
rs.initiate(desiredConfig);
} else {
throw e;
}
}

for (let i = 0; i < 120; i++) {
let status;
try {
status = rs.status();
} catch (e) {
print(\"Waiting for replica set status: \" + e.message);
sleep(2000);
continue;
}

const primaryCount = status.members.filter(member => member.stateStr === \"PRIMARY\").length;
const secondaryCount = status.members.filter(member => member.stateStr === \"SECONDARY\").length;

if (primaryCount === 1 && secondaryCount === 2) {
print(\"Replica set is ready with one primary and two secondaries.\");
quit(0);
}

print(\"Waiting for replica set readiness: primary=\" + primaryCount + \", secondary=\" + secondaryCount);
sleep(2000);
}

throw new Error(\"Replica set did not become ready in time.\");
'
"

volumes:
docdb-host-data:
docdb-host-read-1-data:
docdb-host-read-2-data:
Loading
Loading