Read 2026-10-23
chatchat-space/langchain-chatchat: technical due diligence, read from its repository
What Borehole read in chatchat-space/langchain-chatchat's code and history at 49165d6: 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 |
What the repository says
.gitmodules:1: 1 submodule(s) this survey does not read: chatchat/chatchat/data/knowledge_base/samples/content/wiki
Architecture & Codebase — including AI provenance
strongCommit messages are templated rather than written
adequate41% of commit subjects are exact repeats of another subject, and subject length varies by only 39.1 characters. A log written by someone explaining their reasoning to a future reader does not look like this. The log is therefore weak evidence of intent, whatever the code is like.
| 164× 'Update README.md' |
| 135× 'Add files via upload' |
| 80× 'update README.md' |
Engineering Process & SDLC Maturity
strongAlmost no process scaffolding exists in the repository
adequateOf five ordinary markers — CI workflows, CODEOWNERS, a pull-request template, pre-commit hooks, contribution guidance — 1 is present: CI workflows. Branch protection itself is a GitHub setting rather than a file, so this is a reading of proxies and not of the rules themselves. What it does establish is that the process is not written down anywhere a new engineer would find it.
| 1 of 5 markers present across 523 tracked files |
Product & Engineering Maturity
adequate10% of bug fixes add or change a test
adequateOf 83 fixes in the last 24 months, 8 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.
| 8 of 83 |
Security & Reliability Posture
adequateNone of the standard security guard rails are configured
adequateThere is no disclosure policy, no automated dependency updates, no named code owners and no pre-commit configuration. None of these is load-bearing on its own. Their collective absence says that security posture here is whatever the current team happens to remember to do, which is not a posture that survives the team changing.
| checked 5 kinds of guard rail across 523 tracked files; 0 present |
1 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/Dockerfile — runs as root |
1 environment file is committed
adequatelibs/chatchat-server/.env is tracked in git. Environment files are where credentials usually live, and committing one usually means nobody decided how secrets reach the running application. Whatever is in it is in the history for good. Check 05.1 says whether it holds anything credential-shaped.
libs/chatchat-server/.env — committed environment file |
The build runs third-party code it does not pin
adequate8 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/_release.yml:202 — action pinned by tag |
.github/workflows/_release.yml:249 — action pinned by tag |
5 outbound calls can wait forever
adequate5 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.
libs/chatchat-server/chatchat/server/agent/tools_factory/amap_poi_search.py:19 — outbound call without a timeout |
libs/chatchat-server/chatchat/server/agent/tools_factory/amap_weather.py:22 — outbound call without a timeout |
libs/chatchat-server/chatchat/server/agent/tools_factory/amap_weather.py:37 — outbound call without a timeout |
3 SQL statements built from strings
adequate3 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.
libs/chatchat-server/chatchat/server/knowledge_base/kb_service/relyt_kb_service.py:33 — SQL built from a string |
libs/chatchat-server/chatchat/server/knowledge_base/kb_service/relyt_kb_service.py:45 — SQL built from a string |
libs/chatchat-server/chatchat/server/knowledge_base/migrate.py:82 — SQL built from a string |
9 shell commands built from strings
adequate9 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.
libs/chatchat-server/chatchat/server/llm_api_shutdown.py:31 — command run through a shell |
libs/chatchat-server/chatchat/server/llm_api_stale.py:244 — command run through a shell |
libs/chatchat-server/chatchat/server/llm_api_stale.py:245 — command run through a shell |
2 workload settings give a container the host
adequate2 places in the deployment configuration run a container privileged or in the host's network, process or IPC namespace. A compromise of that container is a compromise of the machine, and most acquirers' security reviews block it. Node agents (network, storage, monitoring) are excluded.
docker/docker-compose.yaml:9 — privileged or host namespace |
docker/docker-compose.yaml:34 — privileged or host namespace |
Manifest says MIT, licence file says Apache-2.0
adequatepyproject.toml declares MIT. LICENSE contains the text of Apache-2.0. Package managers and downstream users read the first; auditors and acquirers read the second. One of them is wrong, and until it is settled the terms this code is offered under are genuinely ambiguous.
pyproject.toml:6 — declares MIT |
LICENSE — text of Apache-2.0 |
8 advisories against this project in the last 24 months, 1 high or critical
adequateThe newest was published on 2026-10-01. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries.
| 2026-10-01: CVE-2026-51884 (critical): The /knowledge_base/upload_temp_docs temporary document upload endpoint in Langchain Chatchat 0.3.1 is vulnerable to path traversal. By crafting malicious filen |
| 2026-05-05: GHSA-jv4p-mhmp-69vw (low): Langchain-Chatchat Uses Insufficiently Random Values |
| 2026-05-05: GHSA-wmvv-fhm6-w34x (low): Langchain-Chatchat Uses a Broken or Risky Cryptographic Algorithm |
| 2026-05-05: GHSA-x229-w2j4-h748 (low): Langchain-Chatchat has a Race Condition in its OpenAI-Compatible File Upload API |
| 2026-05-05: CVE-2026-7844 (low): A vulnerability was detected in chatchat-space Langchain-Chatchat up to 0.3.1.3. This vulnerability affects the function files/list_files/retrieve_file/retrieve |
Observability & Operations
adequateNo telemetry or error reporting is wired in anywhere
adequateNone of 421 readable files references an instrumentation, metrics or error-reporting library. If this system is in production, nobody learns that it broke from the system itself — they learn it from a customer. That is a reliability finding before it is an observability one.
| searched 421 tracked text files for 16 known instrumentation libraries; manifests for metrics, tracing and error-reporting families; locked dependencies for the packages that emit; 0 matched |
No 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 421 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 |
Fit with the Acquirer
not assessableNot rated: structurally not assessable from a repository.
Read more, or read your own
The full report on chatchat-space/langchain-chatchat: 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.