Read 2026-10-23
langgenius/dify: technical due diligence, read from its repository
What Borehole read in langgenius/dify's code and history at 2b35144: 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 | adequate |
| Engineering Process & SDLC Maturity | adequate |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
What the repository says
- Releases are cut from another branch than the one surveyed
LICENSE:1: The licence is Apache-2.0 with a commercial-licence condition: source available, not open sourceLICENSE: Relicensed: Apache-2.0 → Apache-2.0 with terms on offering it as a service (2023-07-28) → Apache-2.0 with a commercial-licence condition and terms on offering it as a service (2024-03-04) → Apache-2.0 with a commercial-licence condition (2024-09-09)CONTRIBUTING.md:76: states a policy on AI-generated contributions
Architecture & Codebase — including AI provenance
adequateweb/i18n/resources.generated.d.ts is 6,671 lines, 79× this codebase's median file
adequateThe median source file here is 84 lines. 92 files exceed 1,000 lines, the largest being 6,671. 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.
web/i18n/resources.generated.d.ts:1 — 6,671 lines (79× median) |
api/services/skill_management_service.py:1 — 4,900 lines (58× median) |
api/controllers/console/knowledge_fs/resources.py:1 — 4,253 lines (50× median) |
api/services/knowledge/dataset_service.py:1 — 3,963 lines (47× median) |
api/services/knowledge_fs/product_dto.py:1 — 3,940 lines (46× median) |
1 base image floats: no version, or `latest`
adequate1 of 13 `FROM` lines in product Dockerfiles name an image without a version, or with `latest`. Each build pulls whatever the registry serves that day, so the image that ships can change without a commit, and last month's build cannot be reproduced. Pin a version, or a digest.
docker/couchbase-server/Dockerfile:1 — base image without a version |
Engineering Process & SDLC Maturity
adequate6% of recent commits change more than 2,000 lines
adequate536 of 9530 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.
| 536 commits over 2,000 lines |
Product & Engineering Maturity
adequate102 direct dependencies in a single manifest
adequateweb/package.json declares 102 direct dependencies. Each one is a maintenance obligation, a supply-chain surface and a potential licence question that transfers with the asset. The count says nothing about whether any given dependency was a good choice; it says how many such choices a buyer inherits.
web/package.json — 102 declared |
api/pyproject.toml — 42 declared |
packages/tooling/package.json — 24 declared |
cli/package.json — 9 declared |
2 jobs are each done by more than one library
adequateWithin a single package: dates: date-fns, dayjs; state management: jotai, zustand. Each duplicate is bundle size, two ways of doing the same thing in one codebase, and two upgrade paths to maintain. It is usually the residue of a migration that stopped halfway.
packages/dify-ui/package.json — several libraries per job |
packages/jotai-tanstack-form/package.json — several libraries per job |
Releases are cut from another branch than the one surveyed
adequateThe newest pre-release, 2.0.0-beta.2, is not on the branch this survey read; the newest release on it is 1.18.0. The shipped product may differ from what this report describes. Survey the release branch too.
| tag 2.0.0-beta.2 |
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.
docker/couchbase-server/Dockerfile — runs as root |
38 SQL statements built from strings
adequate38 places in product code build SQL by formatting or joining strings rather than passing parameters. 1 of them put a value into the string; in the rest, what the code shows going in is a table or column name, a constant, or something the line does not show. Ask whether any value reaches these strings, rather than a parameter.
api/services/plugin/plugin_migration.py:228 — SQL built from a string |
api/extensions/storage/clickzetta_volume/volume_permissions.py:269 — SQL built from a string |
api/providers/vdb/vdb-alibabacloud-mysql/src/dify_vdb_alibabacloud_mysql/alibabacloud_mysql_vector.py:175 — SQL built from a string |
2 deserialisers that can run code
adequate2 places read data with a deserialiser that executes what it reads (pickle, `yaml.load` without a safe loader). That is safe on data the system wrote itself and remote code execution on anything else. Ask where each one's input comes from.
api/models/dataset.py:740 — code-executing deserialiser |
api/services/agent/roster_package_reader.py:352 — code-executing deserialiser |
16 locked dependencies have published vulnerabilities, 5 high or critical in what ships
adequate16 of 2,017 locked dependencies match 72 published advisories in OSV, 40 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.
api/uv.lock — chromadb 0.5.20: GHSA-36p7-vc44-83pf (critical) |
dify-agent/uv.lock — pillow 12.3.0: GHSA-332p-7hrc-92wf (critical), fixed in 13.0.0; an optional extra |
api/uv.lock — pydantic-ai-slim 2.31.0: GHSA-6fqq-452j-qhrp (high), fixed in 2.53.0 |
2 workload settings can give a container the host, behind a chart value or in a stack built from source
adequate2 places run a container privileged or in the host's namespaces only when a Helm value switches them on, or in a compose file that builds the product from this repository, which is how it is developed rather than how it ships. Neither is on by default in what ships. Ask whether production sets the value or runs that stack.
docker/docker-compose-template.yaml:1343 — host access behind a setting or in a local stack |
docker/docker-compose.yaml:1349 — host access behind a setting or in a local stack |
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.
cli/vite.config.ts:23 — source maps in a production build |
packages/dev-proxy/vite.config.ts:11 — source maps in a production build |
packages/migrate-no-unchecked-indexed-access/vite.config.ts:11 — source maps in a production build |
The licence is Apache-2.0 with a commercial-licence condition: source available, not open source
adequateLICENSE grants Apache-2.0 with a commercial-licence condition: source available, not open source; some uses need a commercial licence from the licensor. The reading comes from the licence's own title and clauses. Whether the terms fit the buyer's intended use, and whether any paid licence transfers with the code, is a question for counsel and the licensor.
LICENSE:1 — 22 lines, Apache-2.0 AND LicenseRef-Terms-CommercialLicence |
Relicensed: Apache-2.0 → Apache-2.0 with terms on offering it as a service (2023-07-28) → Apache-2.0 with a commercial-licence condition and terms on offering it as a service (2024-03-04) → Apache-2.0 with a commercial-licence condition (2024-09-09)
adequateThe root licence changed 3 time(s). The latest terms restrict what users, hosts or a buyer may do in ways the earlier ones did not. Code taken under the old terms stays under them, so both matter in diligence.
LICENSE — Apache-2.0 from 2023-05-15 |
LICENSE — Apache-2.0 with terms on offering it as a service from 2023-07-28 |
LICENSE — Apache-2.0 with a commercial-licence condition and terms on offering it as a service from 2024-03-04 |
LICENSE — Apache-2.0 with a commercial-licence condition from 2024-09-09 |
36 advisories against this project in the last 24 months, 18 high or critical
adequateThe newest was published on 2026-09-03. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. Whether 6 of them are fixed in the code you ship could not be told from this history: its version is only known to be at least 1.18.0. Answer lives in: the release you run, set against each fixed version. The record is incomplete: NVD: 6 records name dify with nothing tying them to this repository (CVE-2025-0185, CVE-2026-18266, CVE-2026-18632, …).
| 2026-09-03: CVE-2026-85021 (low): A vulnerability was determined in langgenius dify 1.13.0. Affected is the function router.replace of the file web/app/(shareLayout)/components/splash.tsx of the |
| 2026-09-03: CVE-2026-85022 (low): A vulnerability was identified in langgenius dify 1.13.0. Affected by this vulnerability is the function router.replace of the file web/app/(shareLayout)/webapp |
| 2026-08-19: GHSA-ccrj-frp2-c945 (high), fixed in 1.16.0: IDOR in AppMCPServer PUT Endpoint Allows Modification of Other Apps' MCP Servers |
| 2026-07-15: GHSA-9c9q-5rj5-mjj2 (high), fixed in 1.14.2: Cross-Tenant File Preview via Unscoped Console `file_id` |
| 2026-07-15: GHSA-fj5w-7rc8-3f3f (moderate), fixed in 1.14.0: Cross-Tenant External API Usage Enumeration |
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 10,193 files for 10 structured logging libraries; 0 matched |
9 of 41 deployed images carry no version, or `latest`
adequate9 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/docker-compose.yaml:254 — image without a version |
docker/docker-compose.yaml:895 — image without a version |
docker/docker-compose.yaml:920 — image without a version |
The code branches on the environment's name at 11 places
adequate11 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.
api/models/knowledge_fs_cutover.py:80 — branch on the environment name |
web/app/components/base/analytics-consent/cloud-analytics.tsx:1 — branch on the environment name |
web/app/components/base/analytics-consent/cloud-analytics.tsx:18 — 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 langgenius/dify: 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.