Skip to content

Commit 3ec070e

Browse files
committed
Merge release-1.11.2 into main
2 parents 873d558 + 73629e2 commit 3ec070e

190 files changed

Lines changed: 6894 additions & 1292 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.secrets.baseline

Lines changed: 249 additions & 257 deletions
Large diffs are not rendered by default.

docker/build_and_push.Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data
123123

124124
COPY --from=builder --chown=1000 /app/.venv /app/.venv
125125
ENV PATH="/app/.venv/bin:$PATH"
126+
ENV HOME=/app/data
126127
ENV BASH_ENV="" \
127128
ENV="" \
128129
PROMPT_COMMAND=""
@@ -134,15 +135,15 @@ ENV BASH_ENV="" \
134135
# write secret_key, profile_pictures, etc. Without this, the volume is created
135136
# as root:root and Langflow crashes during startup with PermissionError on
136137
# /app/langflow/secret_key. See https://github.com/langflow-ai/langflow/issues/10437
137-
RUN mkdir -p /app/langflow && chown -R 1000:0 /app/langflow && chmod -R g+rwX /app/langflow
138+
RUN mkdir -p /app/data /app/langflow \
139+
&& chown -R 1000:0 /app/data /app/langflow \
140+
&& chmod -R g+rwX /app/data /app/langflow
138141

139142
# Give the runtime user (uid 1000) a writable npm cache. The image ships Node so
140-
# users can spawn stdio MCP servers via `npx`, but on the ubi10 base
141-
# HOME=/opt/app-root/src is not owned by uid 1000, so npx otherwise fails with
142-
# `EACCES` on ~/.npm/_cacache and every stdio MCP server registers but never
143-
# lists any tools (toolsCount stays null). Pin npm's cache to a
144-
# uid-1000-owned dir (immune to the base image's HOME) and hand ownership of the
145-
# default HOME cache to the runtime user as a fallback.
143+
# users can spawn stdio MCP servers via `npx`. Pin npm's cache to a
144+
# uid-1000-owned dir so callers that override HOME cannot make the cache
145+
# read-only, and keep the UBI base image's default HOME cache writable as a
146+
# fallback.
146147
# See https://github.com/langflow-ai/langflow/pull/13893 (ubi10 base change).
147148
ENV NPM_CONFIG_CACHE=/app/.npm
148149
RUN mkdir -p /app/.npm /opt/app-root/src/.npm \

docker/build_and_push_backend.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ RUN useradd --uid 1000 --gid 0 --no-create-home --home-dir /app/data user
8989
# Copy only the virtual environment
9090
COPY --from=builder --chown=1000:0 /app/.venv /app/.venv
9191
ENV PATH="/app/.venv/bin:$PATH"
92+
ENV HOME=/app/data
9293
ENV BASH_ENV="" \
9394
ENV="" \
9495
PROMPT_COMMAND=""
@@ -104,7 +105,7 @@ ENV BASH_ENV="" \
104105
# Note: .venv is already owned by 1000:0 via COPY --chown above, so no recursive chown needed
105106
RUN mkdir -p /app/data /app/langflow \
106107
&& chown -R 1000:0 /app/data /app/langflow \
107-
&& chmod -R g+rwX /app/langflow \
108+
&& chmod -R g+rwX /app/data /app/langflow \
108109
&& chown 1000:0 /app
109110

110111
LABEL org.opencontainers.image.title=langflow-backend

docker/build_and_push_base.Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data
126126

127127
COPY --from=builder --chown=1000 /app/.venv /app/.venv
128128
ENV PATH="/app/.venv/bin:$PATH"
129+
ENV HOME=/app/data
129130
ENV BASH_ENV="" \
130131
ENV="" \
131132
PROMPT_COMMAND=""
@@ -137,14 +138,15 @@ ENV BASH_ENV="" \
137138
# write secret_key, profile_pictures, etc. Without this, the volume is created
138139
# as root:root and Langflow crashes during startup with PermissionError on
139140
# /app/langflow/secret_key. See https://github.com/langflow-ai/langflow/issues/10437
140-
RUN mkdir -p /app/langflow && chown -R 1000:0 /app/langflow && chmod -R g+rwX /app/langflow
141+
RUN mkdir -p /app/data /app/langflow \
142+
&& chown -R 1000:0 /app/data /app/langflow \
143+
&& chmod -R g+rwX /app/data /app/langflow
141144

142145
# Give the runtime user (uid 1000) a writable npm cache. The image ships Node so
143-
# users can spawn stdio MCP servers via `npx`, but on the ubi10 base
144-
# HOME=/opt/app-root/src is not owned by uid 1000, so npx otherwise fails with
145-
# `EACCES` on ~/.npm/_cacache and stdio MCP servers never list any tools. Pin
146-
# npm's cache to a uid-1000-owned dir (immune to the base image's HOME) and hand
147-
# ownership of the default HOME cache to the runtime user as a fallback.
146+
# users can spawn stdio MCP servers via `npx`. Pin npm's cache to a
147+
# uid-1000-owned dir so callers that override HOME cannot make the cache
148+
# read-only, and keep the UBI base image's default HOME cache writable as a
149+
# fallback.
148150
# See https://github.com/langflow-ai/langflow/pull/13893 (ubi10 base change).
149151
ENV NPM_CONFIG_CACHE=/app/.npm
150152
RUN mkdir -p /app/.npm /opt/app-root/src/.npm \

docker/build_and_push_ep.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data
114114

115115
COPY --from=builder --chown=1000 /app/.venv /app/.venv
116116
ENV PATH="/app/.venv/bin:$PATH"
117+
ENV HOME=/app/data
117118
ENV BASH_ENV="" \
118119
ENV="" \
119120
PROMPT_COMMAND=""
@@ -125,7 +126,9 @@ ENV BASH_ENV="" \
125126
# write secret_key, profile_pictures, etc. Without this, the volume is created
126127
# as root:root and Langflow crashes during startup with PermissionError on
127128
# /app/langflow/secret_key. See https://github.com/langflow-ai/langflow/issues/10437
128-
RUN mkdir -p /app/langflow && chown -R 1000:0 /app/langflow && chmod -R g+rwX /app/langflow
129+
RUN mkdir -p /app/data /app/langflow \
130+
&& chown -R 1000:0 /app/data /app/langflow \
131+
&& chmod -R g+rwX /app/data /app/langflow
129132

130133
LABEL org.opencontainers.image.title=langflow
131134
LABEL org.opencontainers.image.authors=['Langflow']

docker/build_and_push_with_extras.Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data
114114

115115
COPY --from=builder --chown=1000 /app/.venv /app/.venv
116116
ENV PATH="/app/.venv/bin:$PATH"
117+
ENV HOME=/app/data
117118
ENV BASH_ENV="" \
118119
ENV="" \
119120
PROMPT_COMMAND=""
@@ -125,14 +126,15 @@ ENV BASH_ENV="" \
125126
# write secret_key, profile_pictures, etc. Without this, the volume is created
126127
# as root:root and Langflow crashes during startup with PermissionError on
127128
# /app/langflow/secret_key. See https://github.com/langflow-ai/langflow/issues/10437
128-
RUN mkdir -p /app/langflow && chown -R 1000:0 /app/langflow && chmod -R g+rwX /app/langflow
129+
RUN mkdir -p /app/data /app/langflow \
130+
&& chown -R 1000:0 /app/data /app/langflow \
131+
&& chmod -R g+rwX /app/data /app/langflow
129132

130133
# Give the runtime user (uid 1000) a writable npm cache. The image ships Node so
131-
# users can spawn stdio MCP servers via `npx`, but on the ubi10 base
132-
# HOME=/opt/app-root/src is not owned by uid 1000, so npx otherwise fails with
133-
# `EACCES` on ~/.npm/_cacache and stdio MCP servers never list any tools. Pin
134-
# npm's cache to a uid-1000-owned dir (immune to the base image's HOME) and hand
135-
# ownership of the default HOME cache to the runtime user as a fallback.
134+
# users can spawn stdio MCP servers via `npx`. Pin npm's cache to a
135+
# uid-1000-owned dir so callers that override HOME cannot make the cache
136+
# read-only, and keep the UBI base image's default HOME cache writable as a
137+
# fallback.
136138
# See https://github.com/langflow-ai/langflow/pull/13893 (ubi10 base change).
137139
ENV NPM_CONFIG_CACHE=/app/.npm
138140
RUN mkdir -p /app/.npm /opt/app-root/src/.npm \

docs/docs/Components/policies.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ slug: /policies
55

66
The **Policies** component leverages [ToolGuard](https://github.com/AgentToolkit/toolguard) to automatically generate guard code that validates tool execution against defined business policies.
77

8-
With this component, developers define business policies in natural language and integrate policy enforcement into agent workflows. It automatically generates validation code for tools from those policies, protects tool execution by enforcing policy compliance at runtime, and caches generated guard code for better performance.
8+
With this component, developers define business policies in natural language and integrate policy enforcement into agent workflows. It automatically generates validation code for tools from those policies, protects tool execution by enforcing policy compliance at runtime, and stores generated guard code in the flow for reuse.
99

1010
The component supports **Generate** activity, which runs ToolGuard’s buildtime flow to produce new guard code from policies, and **Guard** activity, which reuses previously generated guard code for faster runs.
1111

1212
## Use the component in a flow
1313

1414
When `enabled` is `true`, you must supply at least one policy before generating guards.
1515
Generated guard code is written under `tmp_toolguard/{project_name}/`, with **Step 1** producing guard specifications from policies in `Step_1/`, and **Step 2** turning those specifications into executable guard code in `Step_2/`.
16-
If you switch to **Guard** (apply cached guards), the project directory must already contain valid generated guard code. The component handles module caching and cleanup automatically.
16+
The generated code is also stored in the Policies node. After switching to **Guard**, the component loads that stored code, so the local `tmp_toolguard` directory is not required. If the node does not contain complete generated code, run **Generate** again.
1717

1818
For more information, see the [ToolGuard GitHub repository](https://github.com/AgentToolkit/toolguard).
1919

@@ -22,11 +22,10 @@ For more information, see the [ToolGuard GitHub repository](https://github.com/A
2222
| Name | Type | Description |
2323
|------|------|-------------|
2424
| enabled | Boolean | Input parameter. If `true`, ToolGuard runs before tool execution; if `false`, policy validation is skipped. |
25-
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads existing guards from the project folder. |
25+
| mode | String | Input parameter. **Activity**: **Generate** runs buildtime to create guard code, or **Guard** loads generated guards stored in the flow. |
2626
| project | String | Input parameter. Folder name for generated code under `tmp_toolguard/` (default `my_project`). |
2727
| in_tools | List[Tool] | Input parameter. Tools the agent can use; they are wrapped with policy guards when enabled. |
2828
| policies | List[String] | Input parameter. One or more clear, self-contained business policy strings. Required when generating guards. |
2929
| model | Model | Input parameter. LLM used for Policies buildtime; Anthropic Claude Sonnet is recommended. Required when generating guards. |
3030
| api_key | String | Input parameter. Model provider API key (advanced). Required when generating guards. |
3131
| guarded_tools | List[Tool] | Output parameter. Tools with policy enforcement applied. Returns the original tools when the component is disabled. |
32-

docs/docs/Deployment/deployment-block-custom-components.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To block custom component creation on a Langflow server, set the following [envi
1212
LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false
1313
```
1414

15-
When set to `false`, Langflow blocks creating custom components and changing code in the visual editor.
15+
When set to `false`, Langflow blocks creating custom components, changing code in the visual editor, and running [registered built-in code-execution components](/api-keys-and-authentication#multi-tenant-component-hardening).
1616

1717
When unset or `true`, Langflow allows custom code.
1818
Existing installations keep the default `true` behavior until you opt in to this restriction.
@@ -62,4 +62,4 @@ Default is `true`, which preserves existing behavior. The setting has no effect
6262
For more information, see:
6363

6464
* [Environment variables](/environment-variables#visual-editor-and-playground-behavior)
65-
* [Security](/security)
65+
* [Security](/security)

docs/docs/Develop/api-keys-and-authentication.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ For more information, see [Docker image defaults](/deployment-docker#docker-imag
507507

508508
Enable these flags when untrusted users can build flows on this server.
509509

510-
The `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` and `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` flags are _complementary_.
511-
`LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` blocks user-authored component code, but built-in code-execution components still pass that check because their class code is trusted. Set `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true` to block those built-in components as well.
510+
The `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` and `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` flags support two deployment modes.
511+
`LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false` blocks user-authored component code and registered built-in code-execution components at runtime. Set `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true` independently when custom components should remain enabled but built-in code execution should be disabled.
512512

513513
To enable these flags, set the following:
514514

515-
* `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`: blocks user-authored component code. See [Block custom components](/deployment-block-custom-components).
515+
* `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`: blocks user-authored component code and registered built-in code-execution components. See [Block custom components](/deployment-block-custom-components).
516516
* `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS=true`: blocks built-in code-execution components.
517517
* `LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS=true`: confines built-in file access to the upload sandbox.
518518
* `LANGFLOW_MCP_SERVER_DOCKER_HARDENING=true`: tightens Docker MCP server arguments.

docs/docs/Develop/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ See [Telemetry](/contributing-telemetry).
446446
| `LANGFLOW_BUNDLE_URLS` | List[String] | `[]` | A list of URLs from which to load custom bundles. Supports GitHub URLs. If `LANGFLOW_AUTO_LOGIN=True`, flows from these bundles are loaded into the database. |
447447
| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to a directory containing custom components. Typically used if you have local custom components or you are building a Docker image with custom components. |
448448
| `LANGFLOW_COMPONENTS_INDEX_PATH` | String | Not set | File path or URL (`http://` or `https://`) to a prebuilt component index JSON file used to populate built-in components in the visual editor. When not set, Langflow uses the included index. Useful for supplying a curated component index, for example in airgapped deployments. For more information, see [Block custom components](/deployment-block-custom-components). |
449-
| `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` | Boolean | `True` | If `false`, disables custom components and in-editor editing of component code. This feature is in beta. For more information, see [Block custom components](/deployment-block-custom-components) and [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
449+
| `LANGFLOW_ALLOW_CUSTOM_COMPONENTS` | Boolean | `True` | If `false`, disables custom components, in-editor editing of component code, and registered built-in code-execution components at runtime. This feature is in beta. For more information, see [Block custom components](/deployment-block-custom-components) and [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
450450
| `LANGFLOW_ALLOW_COMPONENTS_PATHS_OVERRIDE` | Boolean | `True` | When `false` alongside `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false`, components contributed by `LANGFLOW_COMPONENTS_PATH` and `LANGFLOW_COMPONENTS_INDEX_PATH` no longer bypass the block. Has no effect when `LANGFLOW_ALLOW_CUSTOM_COMPONENTS=true`. For more information, see [Block custom components](/deployment-block-custom-components). |
451451
| `LANGFLOW_BLOCK_CODE_INTERPRETER_COMPONENTS` | Boolean | `False` | If `true`, blocks built-in code-execution components (Python Interpreter, REPL/Code tools, Smart Transform, and code-running agents). See [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |
452452
| `LANGFLOW_RESTRICT_LOCAL_FILE_ACCESS` | Boolean | `False` | If `true`, confines built-in file components to the upload storage directory and blocks local-file SQL dialects and local Git clones. See [Component hardening for untrusted users](/api-keys-and-authentication#multi-tenant-component-hardening). |

0 commit comments

Comments
 (0)