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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | strong |
| Engineering Process & SDLC Maturity | strong |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
Architecture & Codebase — including AI provenance
stronglightrag/kg/postgres_impl.py is 10,178 lines, 57× this codebase's median file
adequateThe 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.
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
strongNo finding.
Product & Engineering Maturity
adequateFixes are 51% of recent work, up from 27%
adequateIn 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.
| 60%, 42%, 35%, 26%, 23%, 27%, 26%, 21% |
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
adequate7 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.
.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 |
1 SQL statement built from strings
adequate1 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.
lightrag/kg/postgres_impl.py:2453 — SQL built from a string |
27 locked dependencies have published vulnerabilities, 8 high or critical in what ships
adequate27 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.
24 advisories against this project in the last 24 months, 12 high or critical
adequateThe 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.
| 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
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 1,264 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 7 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-full.yml:108 — image without a version |
Fit with the Acquirer
not assessableNot 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.