Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
287f00c
Merge pull request #1348 from CVEProject/prod-staging
jdaigneau5 Feb 19, 2025
3f7a43b
Bump mongoose from 5.13.20 to 8.8.3
dependabot[bot] Dec 3, 2024
e6a3949
Update to remove docker obsolete
david-rocca Dec 4, 2024
5fbf50c
force mongo-cursor-pagination to use newer bson
david-rocca Jan 7, 2025
630034e
update scripts to use new connection string parameters
david-rocca Jan 7, 2025
fecbd87
removed deprecated items from the connection string
david-rocca Jan 7, 2025
bb2a661
Update tests to work with new syntax
david-rocca Jan 7, 2025
80436b3
TEMP: Debugging workflow
david-rocca Jan 7, 2025
c2c4ab0
Revert "TEMP: Debugging workflow"
david-rocca Jan 7, 2025
db81d7d
attempt with new connection string
david-rocca Feb 25, 2025
eda5634
Trying mongoose connection string parameters
david-rocca Feb 25, 2025
9bb6834
Merge branch 'dev' into no-tls-mongo-update
david-rocca Mar 10, 2025
a694b42
update mongo used for tests
david-rocca Mar 10, 2025
cbb8b12
actually remove the auth flag
david-rocca Mar 11, 2025
28a6f62
Merge pull request #1365 from CVEProject/no-tls-mongo-update
david-rocca Mar 11, 2025
0bac76a
Quick fix
david-rocca Mar 11, 2025
bf31636
Added fallback connection
david-rocca Mar 14, 2025
9d085c5
Add logic to read an env var
david-rocca Mar 14, 2025
dce32ad
Merge pull request #1367 from CVEProject/dr_dev_env
jdaigneau5 Mar 17, 2025
3cfd134
Trying to get more info out of this
david-rocca Mar 17, 2025
c9085b3
Merge branch 'dev' into dr_dev_env
david-rocca Mar 17, 2025
afb3937
Merge pull request #1369 from CVEProject/dr_dev_env
david-rocca Mar 17, 2025
651dba9
Attempting to debug dev's aws pipeline
david-rocca Mar 17, 2025
e4fe222
Is AWS reading this?
david-rocca Mar 17, 2025
4ca17ac
attempting to use aws flag
david-rocca Mar 18, 2025
c11da76
Update to 2.5.3
david-rocca Mar 18, 2025
dd5a704
Merge pull request #1371 from CVEProject/2.5.3_version_number
jdaigneau5 Mar 18, 2025
7d522cc
Bump prismjs from 1.29.0 to 1.30.0
dependabot[bot] Mar 18, 2025
c20b793
Merge pull request #1366 from CVEProject/dependabot/npm_and_yarn/pris…
david-rocca Mar 19, 2025
a4378c6
Codeql workflow update
david-rocca Mar 19, 2025
6c6282a
Update latest-staging workflow
david-rocca Mar 19, 2025
3daca27
Update the rest of the workflows
david-rocca Mar 19, 2025
4601e69
Merge pull request #1372 from CVEProject/workflow_cleanup
jdaigneau5 Mar 19, 2025
18c1366
add new api endpoint accessible to all users for getting cve record c…
emathew5 Mar 21, 2025
d44e7df
Merge branch 'int' into dev
david-rocca Mar 24, 2025
5e98d5e
Merge pull request #1373 from CVEProject/dev
jdaigneau5 Mar 24, 2025
44ca111
fixing docdb connection string
david-rocca Mar 27, 2025
e779d56
Merge branch 'int' into dev
david-rocca Mar 27, 2025
4b343cd
Merge pull request #1375 from CVEProject/dev
jdaigneau5 Mar 27, 2025
595bb33
remove required count_only param
emathew5 Mar 31, 2025
c03099a
Merge branch 'master' into int
david-rocca Apr 2, 2025
1f5248e
add integration test and update swagger docs
emathew5 Apr 3, 2025
462a90a
lint-src
emathew5 Apr 3, 2025
f24fb2e
lint test
emathew5 Apr 3, 2025
3af87be
Merge branch 'dev' into emathew/unprivileged-get-cve-count
emathew5 Apr 3, 2025
b75d942
remove count_only as a parameter
emathew5 Apr 7, 2025
fa472d2
Merge pull request #1379 from CVEProject/emathew/unprivileged-get-cve…
david-rocca Apr 9, 2025
e3993da
re-wrote the for loop to correctly terminate on the return
david-rocca May 12, 2025
33f53e9
Update mongoose usage to no longer use n
david-rocca May 12, 2025
6a8840e
Merge pull request #1384 from CVEProject/dr_incorrect_return
jdaigneau5 May 13, 2025
b557e8a
version number updates
david-rocca May 14, 2025
0004e1d
Merge pull request #1386 from CVEProject/dr_v2.5.4_version_number
jdaigneau5 May 14, 2025
10ca105
Merge branch 'int' into dev
david-rocca May 14, 2025
f0a8638
Merge pull request #1387 from CVEProject/dev
jdaigneau5 May 14, 2025
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 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ RATE_LIMIT_WINDOW_SECONDS=60
# The maximum number of connections allowed within the rate limiting window.
# This sets the threshold for how many requests can be made in the specified time frame.
RATE_LIMIT_MAX_CONNECTIONS=1000
#USEMONGO=true
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@231aa2c8a89117b126725a0e11897209b7118144

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -58,4 +58,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@231aa2c8a89117b126725a0e11897209b7118144
2 changes: 1 addition & 1 deletion .github/workflows/latest-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# needs: npm-run-tests
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Log in to GCR
run: |
docker login docker.pkg.github.com \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# needs: npm-run-tests
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Log in to GCR
run: |
docker login docker.pkg.github.com \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -30,9 +30,9 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -47,9 +47,9 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# needs: npm-run-tests
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Extract tag name
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
id: extract_tag
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Build and Run Services and Mongo Containers
run: |
cp docker/.docker-env.example docker/.docker-env
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
docker compose --file test-http/docker/docker-compose.yml exec -T demon pytest src/ | tee test-http/src/testOutput.txt
- name: Archive Test Results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
with:
name: test-results
path: test-http/src/testOutput.txt
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Build and Run Services and Mongo Containers
run: |
cp docker/.docker-env.test-example docker/.docker-env
docker compose --file docker/docker-compose.yml build
docker compose --file docker/docker-compose.yml up -d
- name: Sleep
run: bash -c "while ! docker compose --file docker/docker-compose.yml logs --tail=10 cveawg | grep -q 'Serving on port'; do sleep 1; done"
run: |
dockercompose="docker compose --file docker/docker-compose.yml"
attempts=60
while ! $dockercompose logs cveawg | grep -q 'Serving on port'; do
attempts=$(expr $attempts - 1)
if [ $($dockercompose ps --status running -q | wc -l) -eq 2 ] && [ $attempts -gt 0 ]; then
sleep 10
$dockercompose logs || true
continue
fi
$dockercompose ps || true
$dockercompose logs || true
echo "==== COULD NOT FIND 'Serving on port' in cveawg output OR one of the services died ====" 1>&2
exit 1
done
- name: Run Tests
run: docker compose -f docker/docker-compose.yml exec -T cveawg npm run test:integration
continue-on-error: false
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -30,9 +30,9 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand Down
59 changes: 58 additions & 1 deletion 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.5.2",
"version": "2.5.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.1 CVE Record format. Details of the JSON 5.1 schema are located <a href='https://github.com/CVEProject/cve-schema/tree/v5.1.1-rc2/schema' 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 @@ -1190,6 +1190,63 @@
}
}
},
"/cve_count": {
"get": {
"tags": [
"CVE Record"
],
"summary": "Retrieves the count of all the CVE Records after applying the query parameters as filters (accessible to all users)",
"description": " <h2>Access Control</h2> <p>Endpoint is accessible to all</p> <h2>Expected Behavior</h2> <p>Retrieves the count of all CVE records for all organizations</p>",
"operationId": "cveGetFilteredCount",
"parameters": [
{
"$ref": "#/components/parameters/cveState"
}
],
"responses": {
"200": {
"description": "A count of the total number of filtered CVE records",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/cve/get-cve-record-count.json"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/errors/bad-request.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": [
Expand Down
3 changes: 1 addition & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: '3'
services:
docdb:
# use a mongo image that most closely matches the DocumentDB API
image: mongo:3.6.20-xenial
image: mongo:5.0
container_name: mongo
env_file: .docker-env
networks: ["cve-services"]
Expand Down
Loading
Loading