Read 2026-10-22
medusajs/medusa: technical due diligence, read from its repository
What Borehole read in medusajs/medusa's code and history at 6cc1a4a: 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 | strong |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
What the repository says
CONTRIBUTING.md:314: The project does not take pull requestsAGENTS.md:37: states a policy on AI-generated contributions
Architecture & Codebase — including AI provenance
strongpackages/core/types/src/order/service.ts is 5,133 lines, 135× this codebase's median file
adequateThe median source file here is 38 lines. 58 files exceed 1,000 lines, the largest being 5,133. 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.
packages/core/types/src/order/service.ts:1 — 5,133 lines (135× median) |
packages/modules/order/src/services/order-module-service.ts:1 — 4,510 lines (118× median) |
packages/modules/product/src/services/product-module-service.ts:1 — 4,281 lines (112× median) |
packages/core/types/src/order/common.ts:1 — 3,144 lines (82× median) |
packages/core/types/src/fulfillment/service.ts:1 — 3,077 lines (80× median) |
Engineering Process & SDLC Maturity
adequate9% of recent commits change more than 2,000 lines
adequate310 of 3509 commits in the last 24 months changed over 2,000 lines of code, not counting reformatting, renames, vendored or generated code. A change that size is rarely reviewed line by line. Ask how they were reviewed, and what made them that large.
| 310 commits over 2,000 lines |
Product & Engineering Maturity
strong6 files still carry code deprecated more than two years ago
adequate6 files were marked deprecated over two years ago and still are, the oldest since Mar 2024. A deprecation is a promise to remove. Ask what still depends on these, and whether removing them is scheduled.
packages/medusa/src/types/global.ts — deprecated since Mar 2024 |
packages/core/types/src/common/config-module.ts — deprecated since May 2024 |
packages/core/utils/src/modules-sdk/types/medusa-service.ts — deprecated since Jul 2024 |
packages/core/utils/src/modules-sdk/joiner-config-builder.ts — deprecated since Jul 2024 |
packages/core/utils/src/common/define-config.ts — deprecated since Oct 2024 |
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.
.oss-scanner/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate9 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/action.yml:25 — action pinned by tag |
.github/workflows/action.yml:168 — action pinned by tag |
17 SQL statements built from strings
adequate17 places in product code build SQL by formatting or joining strings rather than passing parameters, and in 5 of them a value, not a table or column name, goes into the string. Where any of those values comes from a request, it is an injection point. Each site needs a look; the fix, parameters, is small.
packages/cli/create-medusa-app/src/utils/create-db.ts:27 — SQL built from a string |
packages/core/utils/src/pg/index.ts:48 — SQL built from a string |
packages/modules/product/src/repositories/product.ts:435 — SQL built from a string |
3 shell commands built from strings
adequate3 places run a command through a shell (`shell=True`, `os.system`, `exec` with a template) rather than passing arguments. Where any part comes from outside, it is command injection. Ask where each one's input comes from.
packages/medusa/src/commands/develop.ts:185 — command run through a shell |
www/utils/packages/docs-automator/src/classes/diff-analyzer.ts:73 — command run through a shell |
www/utils/packages/docs-automator/src/classes/diff-analyzer.ts:149 — command run through a shell |
86 locked dependencies have published vulnerabilities, 94 high or critical
adequate86 of 3,863 locked dependencies match 176 published advisories in OSV, 94 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. This lockfile pins development tools alongside what ships and does not say which is which, so some of these may never reach a user.
www/yarn.lock — dompurify 3.4.15: GHSA-cg2g-xh64-v4q7 (critical), fixed in 3.4.17 |
yarn.lock — dompurify 3.4.16: GHSA-cg2g-xh64-v4q7 (critical), fixed in 3.4.17 |
www/utils/yarn.lock — handlebars 4.7.8: GHSA-2w6w-674q-4c4q (critical), fixed in 4.7.9 |
The production build publishes source maps
adequateThe build configuration emits source maps for production, so the original source, with its comments and structure, is downloadable by every visitor. Upload them to an error tracker and keep them off the public server instead.
packages/design-system/icons/rollup.config.mjs:19 — source maps in a production build |
4 vendored components with no licence
adequateThird-party code is committed into this repository without any statement of the terms it arrived under. Unknown terms are harder to deal with than inconvenient ones: an awkward licence can be complied with, an absent one cannot. Each of these needs its origin established before the code changes hands.
packages/deps/AGENTS.md — 1 tracked files, no licence file |
packages/deps/CHANGELOG.md — 1 tracked files, no licence file |
packages/deps/CLAUDE.md — 1 tracked files, no licence file |
packages/deps/tsconfig.json — 1 tracked files, no licence file |
2 advisories against this project in the last 24 months, 1 high or critical
adequateThe newest was published on 2026-02-11. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. None of them affects the surveyed version. The record is incomplete: NVD: 2 records name medusa with nothing tying them to this repository (CVE-2023-50258, CVE-2023-50259).
| 2026-02-11: CVE-2025-69871 (high): A race condition vulnerability exists in MedusaJS Medusa v2.12.2 and earlier in the registerUsage() function of the promotion module. The function performs a no |
| 2025-11-24: MAL-2025-191457 (unrated): Malicious code in @medusajs/medusa (npm) |
Observability & Operations
adequateSends usage data to telemetry.medusa-commerce.com by default
adequatepackages/medusa-telemetry/src/util/telemetry-dispatcher.js sends to telemetry.medusa-commerce.com, and packages/medusa-telemetry/src/index.js leaves reporting on as shipped. Every installation reports to the vendor unless its operator turns this off. For a buyer running it inside their own product, that is an outbound data flow to a third party: ask what is sent, how often, and whether the buyer's customers were told.
packages/medusa-telemetry/src/util/telemetry-dispatcher.js:16 — reports to telemetry.medusa-commerce.com |
packages/medusa-telemetry/src/index.js:16 — the reporting setting is on by default |
The code branches on the environment's name at 22 places
adequate22 places outside configuration test whether they are running in production or staging. Staging then does not exercise production's code, and each deploy is the first run of those branches. Differences belong in configuration the code reads, not in the code.
packages/cli/medusa-cli/cli.js:7 — branch on the environment name |
packages/cli/medusa-cli/cli.js:8 — branch on the environment name |
packages/core/framework/src/http/express-loader.ts:32 — branch on the environment name |
Fit with the Acquirer
not assessableNot rated: structurally not assessable from a repository.
Read more, or read your own
The full report on medusajs/medusa: 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.