Borehole · Project · free tier
hkuds/lightrag
Free reading: not for reliance
aaebfe1 · 10,873 commits · 1,331 files
Read 2026-10-28

hkuds/lightrag: technical due diligence, read from its repository

What Borehole read in hkuds/lightrag's code and history at aaebfe1: 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 Maturitystrong
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot assessable

Architecture & Codebase — including AI provenance

strong
01.6

lightrag/kg/postgres_impl.py is 10,178 lines, 57× this codebase's median file

adequate

The median source file here is 176 lines. 21 files exceed 1,760 lines, the largest being 10,178. 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
lightrag/kg/postgres_impl.py:1 — 10,178 lines (57× median)
lightrag/lightrag.py:1 — 8,432 lines (47× median)
lightrag/utils.py:1 — 8,294 lines (47× median)
lightrag/pipeline.py:1 — 8,229 lines (46× median)
lightrag/api/routers/document_routes.py:1 — 7,456 lines (42× median)

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

adequate
04.20

Fixes are 51% of recent work, up from 27%

adequate

In the last two quarters 51% of commits were fixes, against 27% in the quarters before. Rising fix work usually means quality debt is coming due, and it takes time that new work would have had.

Evidence
60%, 42%, 35%, 26%, 23%, 27%, 26%, 21%

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

7 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; 1 step pipes a download straight into a shell. 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-build-lite.yml:58 — action pinned by tag
.github/workflows/docker-build-lite.yml:61 — action pinned by tag
Dockerfile:35 — download piped into a shell
05.20

1 SQL statement built from strings

adequate

1 places in product code build SQL by formatting or joining strings rather than passing parameters. In each, what the code shows going in is a table or column name, a constant, or something the line does not show, not a request's value. Ask whether any value reaches these strings, rather than a parameter.

Evidence
lightrag/kg/postgres_impl.py:2453 — SQL built from a string
05.26

27 locked dependencies have published vulnerabilities, 8 high or critical in what ships

adequate

27 of 248 locked dependencies match 120 published advisories in OSV, 56 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
uv.lock — anyio 4.13.0: GHSA-82r6-8w77-94w6 (critical), fixed in 4.14.2
uv.lock — certifi 2026.4.22: GHSA-6q48-6c7w-9gw2 (critical), fixed in 2026.10.18
uv.lock — pillow 12.2.0: GHSA-332p-7hrc-92wf (critical), fixed in 13.0.0; an optional extra
05.65

24 advisories against this project in the last 24 months, 12 high or critical

adequate

The newest was published on 2026-09-05. 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.

Evidence
2026-09-05: GHSA-8wpg-h5wf-jww4 (moderate), fixed in 1.5.7: Quadratic Regular Expression Denial of Service (ReDoS) in LightRAG’s Markdown image parser
2026-09-05: GHSA-2xxv-6q6h-v72v (moderate), fixed in 1.5.7: Uncaught Exception Denial of Service via __proto__ Entity Type in LightRAG WebUI
2026-09-05: GHSA-c922-pw4m-4wcv (high): Persistent Denial of Service via Unvalidated Graph Attribute Injection in LightRAG
2026-09-05: GHSA-2wpj-ffvv-2pq8 (moderate), fixed in 1.5.7: Decompression bomb: a 200 KiB .docx expands without bound during parsing
2026-09-05: GHSA-9p96-5j78-2f9x (moderate), fixed in 1.5.7: Decompression bomb: OOXML packages are expanded with no size or ratio budget in `_extract_xlsx` / `_extract_docx` / `_extract_pptx` and `export_embedded_image`

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 1,264 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 7 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-full.yml:108 — image without a version

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on hkuds/lightrag: 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.