Read 2026-10-23
portkey-ai/gateway: technical due diligence, read from its repository
What Borehole read in portkey-ai/gateway's code and history at 669825c: its licence, security advisories, releases, review practice, tests, dependencies and operations. Every finding cites the file and line it rests on. The full report also covers the team and asks the questions the code cannot answer.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | strong |
| Engineering Process & SDLC Maturity | adequate |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
Architecture & Codebase — including AI provenance
strongsrc/types/modelResponses.ts is 2,635 lines, 43× this codebase's median file
adequateThe median source file here is 61 lines. 6 files exceed 1,000 lines, the largest being 2,635. Size is not a defect on its own — some problems genuinely live in one place — but these are where merge conflicts, review fatigue and single-owner knowledge concentrate, and they are the first thing that slows an inheriting engineer down.
src/types/modelResponses.ts:1 — 2,635 lines (43× median) |
src/handlers/handlerUtils.ts:1 — 1,354 lines (22× median) |
src/providers/bedrock/chatComplete.ts:1 — 1,186 lines (19× median) |
src/providers/google-vertex-ai/chatComplete.ts:1 — 1,162 lines (19× median) |
src/providers/bedrock/uploadFileUtils.ts:1 — 1,094 lines (17× median) |
Engineering Process & SDLC Maturity
adequateTests cover a thin slice of the codebase
adequate41 test files against 573 source files (7.2%). This does not measure whether the tests are good, only whether enough of them exist for the codebase to be changed safely by someone who did not write it — which is exactly the situation after an acquisition.
| 41 test files / 573 source files |
2 committed .only switches other tests off
adequate2 test files commit a focused `.only`, which runs that test and silently skips the rest of its suite. 2 skip markers across 1 of 45 test files. Each is a failure somebody chose to stop seeing; the question is whether anyone is tracking them.
plugins/utils.test.ts:207 — committed .only: other tests do not run |
tests/integration/src/handlers/tryPost.test.ts:182 — committed .only: other tests do not run |
tests/integration/src/handlers/tryPost.test.ts:116 — skipped test |
tests/integration/src/handlers/tryPost.test.ts:544 — skipped test |
Product & Engineering Maturity
adequateNode.js 20 is past end of life
adequateThe code is pinned to Node.js 20 (end of life 2026-04-30). None of these receives security fixes any more; the first stopped on 2026-04-30. Moving off an unsupported runtime is rarely a one-line change, so a buyer should ask whether the upgrade is planned and what it touches.
Dockerfile — Node.js 20, end of life 2026-04-30 |
5% of bug fixes add or change a test
adequateOf 329 fixes in the last 24 months, 17 touched a test. A fix without the test that would have caught the bug can quietly come back, and the suite never learns from what went wrong.
| 17 of 329 |
Security & Reliability Posture
adequate1 Dockerfile runs the application as root
adequateNo USER instruction switches away from root, so the process runs with full privileges inside the container. It is a one-line fix and an ordinary expectation, which is why its absence is worth asking about: it usually says more about whether anyone has reviewed the deployment than about this container specifically.
Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate6 third-party CI actions are referenced by a tag or branch rather than a commit, so they run whatever that tag points to on the day. Tags have been moved to malicious commits in real supply-chain attacks, and a piped script is whatever the server returns that minute. Pinning to a commit is the fix, and it is small.
.github/workflows/docker_publish.yml:16 — action pinned by tag |
.github/workflows/docker_publish.yml:19 — action pinned by tag |
1 of 1 Kubernetes workloads declare no resource limits
adequate1 workload manifests set no CPU or memory limits. One pod that leaks memory or spins can starve everything else on its node, and the scheduler cannot plan capacity for what it cannot see.
deployment.yaml — workload with no limits |
38 locked dependencies have published vulnerabilities, 7 high or critical in what ships
adequate38 of 573 locked dependencies match 147 published advisories in OSV, 66 of them rated high or critical. A lockfile says which version is installed, not whether the flawed code is reachable from this product, so each needs a look. Most are fixed by an upgrade, and the advisory names the version.
cookbook/integrations/vercel/package-lock.json — next 14.2.35: GHSA-2464-fhr4-w9xw (critical), fixed in 15.5.28; in a separate application's lockfile |
package-lock.json — hono 4.9.7: GHSA-3vhc-576x-3qv4 (high), fixed in 4.11.4 |
package-lock.json — ws 8.18.3: GHSA-96hv-2xvq-fx4p (high), fixed in 8.21.0 |
Observability & Operations
adequateNo structured logging library is in use
adequateNothing references a structured logging library. Logs that are written to be read by a person are not searchable by a machine, which means incident response here is proportional to how well someone remembers the codebase rather than to what the tooling can find.
| searched 718 files for 10 structured logging libraries; 0 matched |
No error reporter is wired in
adequateNothing in the service initialises an error reporter (Sentry, Rollbar, Bugsnag, Honeybadger or an APM agent). An exception in production reaches a person only if someone is reading the logs, which usually means a customer reports it first.
| no error reporter initialised |
1 of 1 deployed images carry no version, or `latest`
adequate1 images in the deployment configuration are named without a version or as `latest`. A redeploy can change the software without a commit, a rollback has nothing to roll back to, and nobody can say from the repository what is running.
docker-compose.yaml:6 — image without a version |
1 of 1 deployments run a single replica
adequate1 deployments set `replicas: 1`, and nothing (an autoscaler, a disruption budget) adds more. Every deploy and every node drain is downtime, and the availability the buyer inherits has a ceiling.
deployment.yaml — replicas: 1 |
Fit with the Acquirer
not assessableNot rated: structurally not assessable from a repository.
Read more, or read your own
The full report on portkey-ai/gateway: every dimension, the questions for the room, and the audit log.
Survey a repository: free on public repositories. Private code is read on your own machine by a collector whose source you can read first.