Borehole · Project · free tier
portkey-ai/gateway
Free reading: not for reliance
669825c · 3,457 commits · 766 files
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.

DimensionRating
Architecture & Codebase — including AI provenancestrong
Engineering Process & SDLC Maturityadequate
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot assessable

Architecture & Codebase — including AI provenance

strong
01.6

src/types/modelResponses.ts is 2,635 lines, 43× this codebase's median file

adequate

The 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.

Evidence
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

adequate
02.3

Tests cover a thin slice of the codebase

adequate

41 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.

Evidence
41 test files / 573 source files
02.15

2 committed .only switches other tests off

adequate

2 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.

Evidence
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

adequate
04.17

Node.js 20 is past end of life

adequate

The 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.

Evidence
Dockerfile — Node.js 20, end of life 2026-04-30
04.19

5% of bug fixes add or change a test

adequate

Of 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.

Evidence
17 of 329

Security & Reliability Posture

adequate
05.6

1 Dockerfile runs the application as root

adequate

No 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.

Evidence
Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

6 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.

Evidence
.github/workflows/docker_publish.yml:16 — action pinned by tag
.github/workflows/docker_publish.yml:19 — action pinned by tag
05.34

1 of 1 Kubernetes workloads declare no resource limits

adequate

1 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.

Evidence
deployment.yaml — workload with no limits
05.26

38 locked dependencies have published vulnerabilities, 7 high or critical in what ships

adequate

38 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.

Evidence
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

adequate
06.2

No structured logging library is in use

adequate

Nothing 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.

Evidence
searched 718 files for 10 structured logging libraries; 0 matched
06.9

No error reporter is wired in

adequate

Nothing 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.

Evidence
no error reporter initialised
06.18

1 of 1 deployed images carry no version, or `latest`

adequate

1 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.

Evidence
docker-compose.yaml:6 — image without a version
06.33

1 of 1 deployments run a single replica

adequate

1 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.

Evidence
deployment.yaml — replicas: 1

Fit with the Acquirer

not assessable

Not 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.