Skip to content

Commit eb4f178

Browse files
skwowetcursoragent
andcommitted
Merge branch 'main' into improve/CM-968-foundation
Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents 86947de + 16c13f0 commit eb4f178

573 files changed

Lines changed: 43826 additions & 2998 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/packages-worker-add-entrypoint/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ each worker in its own `src/{worker}/` directory with its own entry point.
1919
services/apps/packages_worker/
2020
src/
2121
bin/
22-
packages-worker.ts ← parent stub
2322
github-repos-enricher.ts ← existing worker
2423
<name>.ts ← entry point you will create
2524
github/ ← existing worker logic

.github/workflows/frontend-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- 'frontend/**'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
lint-frontend:
1013
runs-on: ubuntu-latest

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

AGENTS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ We currently support all our integrations for self-hosting. For each one of them
3232

3333
#### <a name="requirements">Requirements</a>
3434

35-
- [Node](https://nodejs.org/en) v16.16.0
35+
- [Node](https://nodejs.org/en) v20+
3636
- [Docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/)
3737

3838
#### <a name="getting_started">Getting started</a>

backend/.env.dist.composed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ CROWD_PACKAGES_DB_PORT=5432
3535
CROWD_PACKAGES_DB_USERNAME=postgres
3636
CROWD_PACKAGES_DB_PASSWORD=example
3737
CROWD_PACKAGES_DB_DATABASE=packages-db
38+
39+
# security-contacts-worker
40+
SECURITY_CONTACTS_USER_AGENT="lfx-security-contacts-worker"

backend/.env.dist.local

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CROWD_REDIS_PORT=6379
2222

2323
# S3 settings
2424
CROWD_S3_HOST=localhost
25-
CROWD_S3_PORT=9000
25+
CROWD_S3_PORT=9100
2626
CROWD_S3_INTEGRATION_ASSETS_BUCKET=crowd-integrations-assets
2727
CROWD_S3_MICROSERVICES_ASSETS_BUCKET=crowd-microservices-assets
2828
CROWD_S3_AWS_ACCOUNT_ID=000000000000
@@ -170,6 +170,7 @@ CROWD_TINYBIRD_BASE_URL=http://localhost:7181/
170170
# Auth0
171171
CROWD_AUTH0_ISSUER_BASE_URLS=
172172
CROWD_AUTH0_AUDIENCE=
173+
173174
# packages DB (osspckgs)
174175
CROWD_PACKAGES_DB_READ_HOST=localhost
175176
CROWD_PACKAGES_DB_WRITE_HOST=localhost
@@ -184,13 +185,38 @@ ENRICHER_BATCH_SIZE=100
184185
ENRICHER_REPO_UPDATE_INTERVAL_HOURS=24
185186
ENRICHER_IDLE_SLEEP_SEC=60
186187

188+
# security-contacts-worker
189+
SECURITY_CONTACTS_USER_AGENT="lfx-security-contacts-worker"
190+
191+
OSSPCKGS_GCP_PROJECT=local-dev
192+
OSSPCKGS_GCS_BUCKET=local-dev
193+
OSSPCKGS_GCP_CREDENTIALS_B64=e30=
194+
187195
# osv-sync (Temporal-scheduled; see services/apps/packages_worker/src/osv/schedule.ts)
188196
# OSV_ECOSYSTEMS uses OSV's canonical bucket case (npm lowercase, Maven titlecase) because
189197
# the bucket URL <BASE>/<ecosystem>/all.zip is case-sensitive (Maven/all.zip exists,
190198
# maven/all.zip 404s). The allowlist check and DB storage normalize to lowercase
191199
# internally per ADR-0001 §OSV "Ecosystem normalization", so downstream stays lowercase.
192200
OSV_BULK_BASE_URL=https://osv-vulnerabilities.storage.googleapis.com
193-
OSV_ECOSYSTEMS=npm,Maven
201+
OSV_ECOSYSTEMS=npm,Maven,cargo,NuGet
194202
OSV_TMP_DIR=/tmp/osv
195203
OSV_BATCH_SIZE=500
196204
OSV_DERIVE_BATCH_SIZE=1000
205+
206+
# maven enricher
207+
208+
MAVEN_FETCHER_BATCH_SIZE=2000
209+
MAVEN_FETCHER_CONCURRENCY=10
210+
MAVEN_FETCHER_NON_CRITICAL_BATCH_SIZE=500
211+
MAVEN_FETCHER_NON_CRITICAL_CONCURRENCY=20
212+
MAVEN_FETCHER_REFRESH_DAYS=1
213+
MAVEN_FETCHER_GROUP_DELAY_MS=100
214+
MAVEN_FETCHER_BASE_URL_BACKFILL=https://maven-central.storage-download.googleapis.com/maven2
215+
MAVEN_FETCHER_BASE_URL_INCREMENTAL=https://repo1.maven.org/maven2
216+
217+
# dockerhub-sync (see services/apps/packages_worker/src/dockerhub/)
218+
DOCKERHUB_API_BASE_URL=https://hub.docker.com/v2
219+
DOCKERHUB_BATCH_SIZE=100
220+
DOCKERHUB_REFRESH_INTERVAL_HOURS=24
221+
DOCKERHUB_DISCOVERY_INTERVAL_DAYS=14
222+
DOCKERHUB_IDLE_SLEEP_SEC=60

backend/.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ dist
22
node_modules
33
admin
44
venv-*
5-
.serverless
5+
.serverless
6+
.claude

backend/config/custom-environment-variables.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
"password": "PRODUCT_DB_PASSWORD",
5050
"database": "PRODUCT_DB_DATABASE"
5151
},
52+
"packagesDb": {
53+
"host": "CROWD_PACKAGES_DB_WRITE_HOST",
54+
"port": "CROWD_PACKAGES_DB_PORT",
55+
"user": "CROWD_PACKAGES_DB_USERNAME",
56+
"password": "CROWD_PACKAGES_DB_PASSWORD",
57+
"database": "CROWD_PACKAGES_DB_DATABASE"
58+
},
5259
"segment": {
5360
"writeKey": "CROWD_SEGMENT_WRITE_KEY"
5461
},

backend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"script:continue-run": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/continue-run.ts",
2020
"script:trigger-webhook": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/trigger-webhook.ts",
2121
"script:send-weekly-analytics-email": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/send-weekly-analytics-email.ts",
22+
"script:merge-members": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/merge-members.ts",
2223
"script:merge-organizations": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/merge-organizations.ts",
2324
"script:refresh-materialized-views": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/refresh-materialized-views.ts",
2425
"script:unmerge-members": "SERVICE=script TS_NODE_TRANSPILE_ONLY=true tsx src/bin/scripts/unmerge-members.ts",
@@ -142,7 +143,7 @@
142143
"@types/cron": "^2.0.0",
143144
"@types/express": "^4.17.17",
144145
"@types/html-to-text": "^8.1.1",
145-
"@types/node": "~18.0.4",
146+
"@types/node": "^20.8.2",
146147
"@types/sanitize-html": "^2.6.2",
147148
"@types/superagent": "^4.1.15",
148149
"@types/uuid": "^9.0.2",

0 commit comments

Comments
 (0)