Skip to content

Update dependencies to fix known vulnerabilities - #58

Open
NebiyatS wants to merge 1 commit into
promaster-sdk:masterfrom
NebiyatS:chore/update-dependencies
Open

NebiyatS wants to merge 1 commit into
promaster-sdk:masterfrom
NebiyatS:chore/update-dependencies

Conversation

@NebiyatS

Copy link
Copy Markdown

pnpm audit --prod` goes from 68 findings (4 critical, 35 high) to none.

Dependency changes

  • OpenTelemetry stack updated to current majors (sdk-node 0.300, auto-instrumentations-node 0.82, resources 3, exporter-trace-otlp-grpc replaces exporter-otlp-grpc)
  • koa ^2.16.4, @koa/cors 5, multer 2, convict 6, jsonwebtoken 9, jwks-rsa 3, uuid 11
  • koa-multer replaced by @koa/multer (koa-multer is pinned to multer 1)
  • Removed the vitest/otel peer dependency rule

Code changes needed by the upgrades

  • config: convict 6 dropped the ipaddress and url formats, replaced with custom formats (net.isIP / URL.canParse)
  • publish: @koa/multer exposes uploaded files on ctx.request.files
  • otel: new resource and semantic-convention APIs, sdk.start() is synchronous, getEnv removed
  • token validation: handle a missing signing key (jwks-rsa 3 types)

Testing

  • build, lint, format and the 17 vitest tests pass
  • Compared against master on two real published databases: /rest/v3 (latest, markers, trees, transactions) and /graphql responses are byte-identical
  • Real Promaster JWT validated against the Keycloak JWKS: valid token accepted, wrong tenant, tampered and missing token rejected
  • OTel starts and traces initialise

Kinatzo added a commit that referenced this pull request Nov 5, 2026
Package upgrades from #58 with only the code changes the new
versions require:

- OpenTelemetry: sdk-node 0.300, auto-instrumentations-node 0.82,
  core/resources 3, exporter-otlp-grpc -> exporter-trace-otlp-grpc
- koa ^2.16.4, @koa/cors 5, multer 2, koa-multer -> @koa/multer 4
- convict 6 (+ convict-format-with-validator for the removed
  ipaddress/url formats), jsonwebtoken 9, jwks-rsa 3, uuid 11

pnpm audit --prod: 2 moderate remain (glob/minimatch via the OTel
GCP resource detector, already at latest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant