gemini-cli-leo 0.1.30-pre.4 → 0.1.31-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/cli/enterprise.md +23 -5
- package/gemini.mjs +731 -132
- package/package.json +1 -1
package/docs/cli/enterprise.md
CHANGED
|
@@ -369,16 +369,22 @@ third-party MCP server, even if the server offers other tools like
|
|
|
369
369
|
|
|
370
370
|
#### More secure pattern: Define and add to allowlist in system settings
|
|
371
371
|
|
|
372
|
-
To create a secure, centrally-managed catalog of tools,
|
|
373
|
-
|
|
372
|
+
To create a secure, centrally-managed catalog of tools, you **must** complete
|
|
373
|
+
all of the following steps when configuring the system-level `settings.json`
|
|
374
|
+
file:
|
|
374
375
|
|
|
375
376
|
1. **Define the full configuration** for every approved server in the
|
|
376
377
|
`mcpServers` object. This ensures that even if a user defines a server with
|
|
377
|
-
the same name, the secure system-level definition
|
|
378
|
+
the same name, the secure system-level definition takes precedence.
|
|
378
379
|
2. **Add the names** of those servers to an allowlist using the `mcp.allowed`
|
|
379
380
|
setting. This is a critical security step that prevents users from running
|
|
380
|
-
any servers that
|
|
381
|
-
|
|
381
|
+
any servers that aren't on this list. If you omit this setting, Gemini CLI
|
|
382
|
+
merges and runs any server defined by the user.
|
|
383
|
+
3. **Lock down executable and directory permissions** for every local command
|
|
384
|
+
referenced in `mcpServers`. Each executable script or binary, its parent
|
|
385
|
+
directories, and any scripts or dependencies it invokes **must** be owned by
|
|
386
|
+
`root` (or `SYSTEM` or `Administrators` on Windows) and **must not** be
|
|
387
|
+
writable by non-administrative users or shared user groups.
|
|
382
388
|
|
|
383
389
|
**Example system `settings.json`:**
|
|
384
390
|
|
|
@@ -409,6 +415,18 @@ Any server a user defines will either be overridden by the system definition (if
|
|
|
409
415
|
it has the same name) or blocked because its name is not in the `mcp.allowed`
|
|
410
416
|
list.
|
|
411
417
|
|
|
418
|
+
<!-- prettier-ignore -->
|
|
419
|
+
> [!WARNING]
|
|
420
|
+
> Gemini CLI skips system-configured MCP servers whose local command or script
|
|
421
|
+
> path fails ownership or write-permission checks and logs a startup security
|
|
422
|
+
> warning. Ensure any secondary scripts, binaries, and dependencies invoked
|
|
423
|
+
> inside wrapper scripts are also locked down. Because `mcp.allowed`
|
|
424
|
+
> automatically approves tool calls from listed servers, we recommend
|
|
425
|
+
> restricting exposed tools with `includeTools`, pinning absolute binary paths
|
|
426
|
+
> inside wrapper scripts, or enforcing remote (`sse` or `http`) server
|
|
427
|
+
> allowlists with
|
|
428
|
+
> [Enterprise Admin Controls](../admin/enterprise-controls.md).
|
|
429
|
+
|
|
412
430
|
### Less secure pattern: Omitting the allowlist
|
|
413
431
|
|
|
414
432
|
If the administrator defines the `mcpServers` object but fails to also specify
|