Borehole · Project · free tier
cinnamon/kotaemon
Free reading: not for reliance
9ad3e4e · 327 commits · 414 files
Read 2026-11-03

cinnamon/kotaemon: technical due diligence, read from its repository

What Borehole read in cinnamon/kotaemon's code and history at 9ad3e4e: 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

libs/ktem/ktem/index/file/ui.py is 1,895 lines, 23× this codebase's median file

adequate

The median source file here is 80 lines. 2 files exceed 1,000 lines, the largest being 1,895. 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
libs/ktem/ktem/index/file/ui.py:1 — 1,895 lines (23× median)
libs/ktem/ktem/pages/chat/__init__.py:1 — 1,459 lines (18× median)

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

adequate
04.19

5% of bug fixes add or change a test

adequate

Of 82 fixes in the last 24 months, 4 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
4 of 82

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

14 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/auto-bump-and-release.yaml:18 — action pinned by tag
.github/workflows/auto-bump-and-release.yaml:46 — action pinned by tag
Dockerfile:119 — download piped into a shell
05.13

18 outbound calls can wait forever

adequate

18 HTTP calls use a client with no timeout (Python `requests` without `timeout=`, or Go's default client). When a dependency slows down, each one holds a worker until the connection gives up, and enough of them take the service down with the dependency.

Evidence
libs/kotaemon/kotaemon/contribs/promptui/tunnel.py:43 — outbound call without a timeout
libs/kotaemon/kotaemon/indices/retrievers/jina_web_search.py:33 — outbound call without a timeout
libs/kotaemon/kotaemon/llms/chats/endpoint_based.py:59 — outbound call without a timeout
05.22

4 deserialisers that can run code

adequate

4 places read data with a deserialiser that executes what it reads (pickle). That is safe on data the system wrote itself and remote code execution on anything else. Ask where each one's input comes from.

Evidence
libs/kotaemon/kotaemon/contribs/promptui/export.py:46 — code-executing deserialiser
libs/kotaemon/kotaemon/contribs/promptui/export.py:56 — code-executing deserialiser
libs/kotaemon/kotaemon/contribs/promptui/ui/chat.py:272 — code-executing deserialiser
05.26

37 locked dependencies have published vulnerabilities, 56 high or critical in what ships

adequate

37 of 429 locked dependencies match 122 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 — chromadb 0.5.16: GHSA-36p7-vc44-83pf (critical)
uv.lock — pillow 10.4.0: GHSA-332p-7hrc-92wf (critical), fixed in 13.0.0
uv.lock — torch 2.2.2: GHSA-53q9-r3pm-6pq6 (critical), fixed in 2.6.0
05.65

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

adequate

The newest was published on 2026-08-28. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. The record is incomplete: NVD: 1 record names kotaemon with nothing tying it to this repository (CVE-2026-86867).

Evidence
2026-08-28: CVE-2026-82281 (critical): Kotaemon Missing Ownership Check in Conversation Functions
2026-08-04: CVE-2026-69098 (critical): kotaemon 0.12.0 Unauthenticated Remote Code Execution via Insecure Deserialization
2025-11-24: CVE-2025-63914 (moderate): An issue was discovered in Cinnamon kotaemon 0.11.0. The _may_extract_zip function in the \libs\ktem\ktem\index\file\ui.py file does not check the contents of u
2025-11-18: CVE-2025-56526 (moderate): Cross site scripting (XSS) vulnerability in Kotaemon 0.11.0 allowing attackers to execute arbitrary code via a crafted PDF.
2025-11-18: CVE-2025-56527 (high): Plaintext password storage in Kotaemon 0.11.0 in the client's localStorage.

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 357 files for 10 structured logging libraries; 0 matched
06.7

The service logs with print: 160 calls against 52 logger calls

adequate

160 `print` or `console.log` calls in the service's code, and 52 calls through a logger. Printed lines carry no level and no context, cannot be switched off, and are hard to find again in production.

Evidence
libs/kotaemon/kotaemon/agents/io/base.py:71 — print used for logging
libs/kotaemon/kotaemon/agents/react/agent.py:276 — print used for logging
libs/kotaemon/kotaemon/agents/react/agent.py:285 — print used for logging
06.8

One request cannot be followed through the logs

adequate

Nothing in the service carries a request or correlation id, and there is no tracing. When a customer reports a failure, the log lines that belong to their request cannot be picked out from everyone else's.

Evidence
no request id, correlation id or tracing found
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

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on cinnamon/kotaemon: 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.