mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-18 10:06:30 +03:00
fix(web): keep credential-bearing URLs away from the remote Jina reader
This commit is contained in:
@@ -1921,6 +1921,14 @@ Create a key at [serper.dev](https://serper.dev). You can also set `SERPER_API_K
|
||||
|
||||
nanobot by default uses [Jina Reader](https://jina.ai/reader/), a third-party API, to convert arbitrary pages into Markdown format for easy digestion by the LLM, with a local fallback based on [readability-lxml](https://github.com/buriy/python-readability) if the former fails.
|
||||
|
||||
> [!NOTE]
|
||||
> Using the remote reader means the fetched URL itself is disclosed to the
|
||||
> third-party service. URLs that visibly carry credentials (userinfo, signed-URL
|
||||
> or token-style query parameters) are detected and fetched locally instead, but
|
||||
> secrets embedded in a URL's *path* (for example bot-token or webhook-style
|
||||
> URLs) cannot be reliably detected. Set `useJinaReader: false` if fetched URLs
|
||||
> must never leave the machine.
|
||||
|
||||
If you want to always use the local conversion, you can force it using:
|
||||
|
||||
```json
|
||||
|
||||
@@ -81,6 +81,10 @@ in the WebUI or logs.
|
||||
- Web fetch and HTTP MCP share an SSRF guard.
|
||||
- Private, loopback, link-local, and cloud metadata addresses are blocked by
|
||||
default.
|
||||
- With `useJinaReader` enabled (the default), fetched URLs are disclosed to the
|
||||
remote reader service. Credential-bearing URLs (userinfo or token/signature
|
||||
query parameters) are fetched locally instead; path-embedded secrets cannot
|
||||
be detected, so disable the remote reader when URLs must stay local.
|
||||
- Add `tools.ssrfWhitelist` only for narrow trusted CIDRs.
|
||||
- Do not give public chat users unrestricted web and shell access without
|
||||
review.
|
||||
|
||||
Reference in New Issue
Block a user