Skip to content

fix(api): gate sandbox artifact download on agent session ownership - #16169

Merged
yuzhichang merged 3 commits into
infiniflow:mainfrom
kiannidev:fix/16168-sandbox-artifact-session-auth
Jun 28, 2026
Merged

yuzhichang merged 3 commits into
infiniflow:mainfrom
kiannidev:fix/16168-sandbox-artifact-session-auth

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16168

Summary

  • Add session-scoped authorization for GET /api/v1/documents/artifact/<filename>
  • Allow download only when the artifact filename appears in the caller's api_4_conversation message and UserCanvasService.accessible(dialog_id, user_id) passes
  • Deny with generic "Artifact not found." before storage access (no cross-user enumeration)
  • Return 4xx when the blob is missing (existing behavior preserved)

Approach

Sandbox artifacts are runtime CodeExec outputs, not KB documents — this uses the same session gate pattern as agent_chat_completion, not DocumentService.accessible.

Test plan

  • Unit: denied when filename not referenced in user sessions
  • Unit: denied when agent canvas is not accessible
  • Unit: authorized user receives bytes; missing blob returns "Artifact not found."
  • pytest test/testcases/test_web_api/test_document_app/test_document_metadata.py -k get_artifact

Require CodeExec artifact filenames to appear in the caller's
api_4_conversation messages and pass UserCanvasService.accessible
before reading from SANDBOX_ARTIFACT_BUCKET.

Fixes infiniflow#16168

Co-authored-by: Cursor <[email protected]>
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR fixes a cross-user artifact leakage vulnerability on GET /documents/artifact/<filename>. It adds two helper functions that query API4Conversation for dialog IDs referencing the artifact filename, then verify accessibility via UserCanvasService.accessible. The route now rejects requests failing this check. Three unit tests cover the denied and success paths.

Changes

Sandbox Artifact Authorization

Layer / File(s) Summary
Authorization helpers and route gate
api/apps/restful_apis/document_api.py
Imports UserCanvasService, adds _sandbox_artifact_dialog_ids_for_user (queries API4Conversation via DB.connection_context() for dialog IDs referencing the filename) and _sandbox_artifact_accessible (checks each dialog ID with UserCanvasService.accessible). Updates the get_artifact route to call _sandbox_artifact_accessible before reading storage, returning "Artifact not found." on failure.
Unit tests for access control paths
test/testcases/test_web_api/test_document_app/test_document_metadata.py
Adds three unit tests to TestDocumentMetadataUnit: denial when no dialog IDs are returned, denial when UserCanvasService.accessible returns False, and success path asserting correct response headers (content_type, extension) plus a re-mocked storage None case asserting DATA_ERROR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A sneaky fox tried to steal a PNG,
But now the route checks: "Does this belong to thee?"
Dialog IDs queried, canvas access confirmed,
Cross-tenant artifact leaks have been firmly squirmed.
The rabbit hops safe, with tests to agree! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly identifies the main change: adding access control (gating) for sandbox artifact downloads based on agent session ownership.
Description check ✅ Passed The description is comprehensive, covering the problem solved, approach, test plan, and detailed implementation notes. It addresses the template sections with concrete details rather than placeholder text.
Linked Issues check ✅ Passed The changes fully implement the requirements from issue #16168: added session-scoped authorization via _sandbox_artifact_accessible, validates artifact ownership through api_4_conversation messages and UserCanvasService.accessible, returns generic error before storage access to prevent enumeration, and includes comprehensive unit tests.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the vulnerability in issue #16168: authorization logic in document_api.py and corresponding unit tests in test_document_metadata.py. No unrelated changes or scope creep detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
test/testcases/test_web_api/test_document_app/test_document_metadata.py (3)

627-634: ⚡ Quick win

Add @pytest.mark.p2 priority marker for consistency.

Other security-related unit tests in this class use @pytest.mark.p2. This test should follow the same convention. As per coding guidelines, use pytest with priority markers (p1/p2/p3) for Python testing.

Proposed fix
+    `@pytest.mark.p2`
     def test_get_artifact_denied_without_session_reference_unit(self, document_app_module, monkeypatch):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/testcases/test_web_api/test_document_app/test_document_metadata.py`
around lines 627 - 634, The test method
test_get_artifact_denied_without_session_reference_unit is missing the
`@pytest.mark.p2` priority marker that other security-related unit tests in this
class use. Add the `@pytest.mark.p2` decorator above the test method definition to
maintain consistency with the coding guidelines for pytest priority markers.

Source: Coding guidelines


636-644: ⚡ Quick win

Add @pytest.mark.p2 priority marker for consistency.

Same as above—this security authorization test should have the priority marker.

Proposed fix
+    `@pytest.mark.p2`
     def test_get_artifact_denied_when_agent_not_accessible_unit(self, document_app_module, monkeypatch):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/testcases/test_web_api/test_document_app/test_document_metadata.py`
around lines 636 - 644, Add the `@pytest.mark.p2` priority marker decorator above
the test_get_artifact_denied_when_agent_not_accessible_unit method definition to
maintain consistency with other similar security authorization tests in the test
suite. The marker should be placed on a new line immediately before the def
statement of the method.

Source: Coding guidelines


646-695: ⚡ Quick win

Add @pytest.mark.p2 priority marker for consistency.

This test covers critical security authorization paths and should have the priority marker like other tests in the class.

Proposed fix
+    `@pytest.mark.p2`
     def test_get_artifact_success_and_missing_blob_unit(self, document_app_module, monkeypatch):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/testcases/test_web_api/test_document_app/test_document_metadata.py`
around lines 646 - 695, The test method
test_get_artifact_success_and_missing_blob_unit is missing the pytest priority
marker that should be applied for consistency with other tests in the class. Add
the `@pytest.mark.p2` decorator on the line immediately before the method
definition to mark this test with p2 priority, ensuring it aligns with the
priority markers used throughout the test class.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/testcases/test_web_api/test_document_app/test_document_metadata.py`:
- Around line 627-634: The test method
test_get_artifact_denied_without_session_reference_unit is missing the
`@pytest.mark.p2` priority marker that other security-related unit tests in this
class use. Add the `@pytest.mark.p2` decorator above the test method definition to
maintain consistency with the coding guidelines for pytest priority markers.
- Around line 636-644: Add the `@pytest.mark.p2` priority marker decorator above
the test_get_artifact_denied_when_agent_not_accessible_unit method definition to
maintain consistency with other similar security authorization tests in the test
suite. The marker should be placed on a new line immediately before the def
statement of the method.
- Around line 646-695: The test method
test_get_artifact_success_and_missing_blob_unit is missing the pytest priority
marker that should be applied for consistency with other tests in the class. Add
the `@pytest.mark.p2` decorator on the line immediately before the method
definition to mark this test with p2 priority, ensuring it aligns with the
priority markers used throughout the test class.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a98adf4-a358-4fbf-874d-64f7578af738

📥 Commits

Reviewing files that changed from the base of the PR and between 065797b and 8d1d082.

📒 Files selected for processing (2)
  • api/apps/restful_apis/document_api.py
  • test/testcases/test_web_api/test_document_app/test_document_metadata.py

@kiannidev

Copy link
Copy Markdown
Contributor Author

Hi, @wangq8 , @Haruko386 , @JinHai-CN @yingfeng @xugangqiang @buua436
Please review this PR

@yuzhichang
yuzhichang self-requested a review June 28, 2026 00:44
@yuzhichang yuzhichang added the ci Continue Integration label Jun 28, 2026
@yuzhichang
yuzhichang merged commit 4712fcb into infiniflow:main Jun 28, 2026
2 of 3 checks passed
yuzhichang added a commit that referenced this pull request Jun 29, 2026
…16169)

Fixes #16168

## Summary
- Add session-scoped authorization for `GET
/api/v1/documents/artifact/<filename>`
- Allow download only when the artifact filename appears in the caller's
`api_4_conversation` message and
`UserCanvasService.accessible(dialog_id, user_id)` passes
- Deny with generic `"Artifact not found."` before storage access (no
cross-user enumeration)
- Return 4xx when the blob is missing (existing behavior preserved)

## Approach
Sandbox artifacts are runtime CodeExec outputs, not KB documents — this
uses the same session gate pattern as `agent_chat_completion`, not
`DocumentService.accessible`.

## Test plan
- [x] Unit: denied when filename not referenced in user sessions
- [x] Unit: denied when agent canvas is not accessible
- [x] Unit: authorized user receives bytes; missing blob returns
`"Artifact not found."`
- [ ] `pytest
test/testcases/test_web_api/test_document_app/test_document_metadata.py
-k get_artifact`

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Zhichang Yu <[email protected]>
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Jun 29, 2026
Ports 4 M-effort PRs from .claude/plans/review-and-port-py-agent-changes.md
Execution snapshot (all merged upstream) to the Go agent side.

Group 4 - API auth ports
- infiniflow#16169 Sandbox artifact ownership: add UserCanvasDAO.Accessible
  (owner-or-team predicate) and DocumentService.sandboxArtifactAccessible
  to gate GET /api/v1/documents/artifact/<filename>. Query
  API4Conversation for sessions owned by userID whose message blob
  references the filename (or its documents/artifact/<name> URL
  form); require at least one accessible canvas. Handler now
  fetches the current user and passes userID into the service;
  denial returns ErrArtifactNotFound to avoid cross-user
  enumeration.
- infiniflow#15457 Tenant ownership on agentbots: Go side already had the
  loadCanvas IDOR guard at the entry of both AgentbotInputs and
  AgentbotCompletion. Added a cross-tenant regression test
  (tenant-B asks for tenant-A's canvas -> ErrUserCanvasNotFound).
- infiniflow#15145 Rerun agent document access: add DocumentService.Accessible
  (loads doc, checks kbDAO.Accessible). Wire documentService into
  AgentHandler via WithDocumentService (nil-tolerant, preserves
  the existing NewAgentHandler signature for tests). RerunAgent
  returns "Document not found." when accessible check fails;
  cmd/server_main.go wires documentService after construction.

Group 2 - thinking switch
- infiniflow#15446 component portion: add Thinking field to LLMParam,
  LLMInput, and ChatInvokeRequest. mergeLLMParam reads
  inputs["thinking"] with a whitelist of {"enabled","disabled"}
  (matching python llm.py:78-79); arbitrary strings are
  rejected. The provider policy portion (Qwen/Kimi/GLM in
  rag/llm/chat_model.py) belongs to internal/llm/ and is a
  separate porting stream.

Total: 4 new tests across 3 modified test files. All touched
package tests pass (1697 + 4 skipped). The 1 failing test
(TestAgent_ReActExhaustsSteps) is the pre-existing flaky test
that also fails on the baseline without my changes.

Refs: .claude/plans/review-and-port-py-agent-changes.md
Refs: infiniflow#16169 infiniflow#15457 infiniflow#15145 infiniflow#15446
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Jun 29, 2026
Ports 4 M-effort PRs from .claude/plans/review-and-port-py-agent-changes.md
Execution snapshot (all merged upstream) to the Go agent side.

Group 4 - API auth ports
- infiniflow#16169 Sandbox artifact ownership: add UserCanvasDAO.Accessible
  (owner-or-team predicate) and DocumentService.sandboxArtifactAccessible
  to gate GET /api/v1/documents/artifact/<filename>. Query
  API4Conversation for sessions owned by userID whose message blob
  references the filename (or its documents/artifact/<name> URL
  form); require at least one accessible canvas. Handler now
  fetches the current user and passes userID into the service;
  denial returns ErrArtifactNotFound to avoid cross-user
  enumeration.
- infiniflow#15457 Tenant ownership on agentbots: Go side already had the
  loadCanvas IDOR guard at the entry of both AgentbotInputs and
  AgentbotCompletion. Added a cross-tenant regression test
  (tenant-B asks for tenant-A's canvas -> ErrUserCanvasNotFound).
- infiniflow#15145 Rerun agent document access: add DocumentService.Accessible
  (loads doc, checks kbDAO.Accessible). Wire documentService into
  AgentHandler via WithDocumentService (nil-tolerant, preserves
  the existing NewAgentHandler signature for tests). RerunAgent
  returns "Document not found." when accessible check fails;
  cmd/server_main.go wires documentService after construction.

Group 2 - thinking switch
- infiniflow#15446 component portion: add Thinking field to LLMParam,
  LLMInput, and ChatInvokeRequest. mergeLLMParam reads
  inputs["thinking"] with a whitelist of {"enabled","disabled"}
  (matching python llm.py:78-79); arbitrary strings are
  rejected. The provider policy portion (Qwen/Kimi/GLM in
  rag/llm/chat_model.py) belongs to internal/llm/ and is a
  separate porting stream.

Total: 4 new tests across 3 modified test files. All touched
package tests pass (1697 + 4 skipped). The 1 failing test
(TestAgent_ReActExhaustsSteps) is the pre-existing flaky test
that also fails on the baseline without my changes.

Refs: .claude/plans/review-and-port-py-agent-changes.md
Refs: infiniflow#16169 infiniflow#15457 infiniflow#15145 infiniflow#15446
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Jun 29, 2026
Ports 4 M-effort PRs from .claude/plans/review-and-port-py-agent-changes.md
Execution snapshot (all merged upstream) to the Go agent side.

Group 4 - API auth ports
- infiniflow#16169 Sandbox artifact ownership: add UserCanvasDAO.Accessible
  (owner-or-team predicate) and DocumentService.sandboxArtifactAccessible
  to gate GET /api/v1/documents/artifact/<filename>. Query
  API4Conversation for sessions owned by userID whose message blob
  references the filename (or its documents/artifact/<name> URL
  form); require at least one accessible canvas. Handler now
  fetches the current user and passes userID into the service;
  denial returns ErrArtifactNotFound to avoid cross-user
  enumeration.
- infiniflow#15457 Tenant ownership on agentbots: Go side already had the
  loadCanvas IDOR guard at the entry of both AgentbotInputs and
  AgentbotCompletion. Added a cross-tenant regression test
  (tenant-B asks for tenant-A's canvas -> ErrUserCanvasNotFound).
- infiniflow#15145 Rerun agent document access: add DocumentService.Accessible
  (loads doc, checks kbDAO.Accessible). Wire documentService into
  AgentHandler via WithDocumentService (nil-tolerant, preserves
  the existing NewAgentHandler signature for tests). RerunAgent
  returns "Document not found." when accessible check fails;
  cmd/server_main.go wires documentService after construction.

Group 2 - thinking switch
- infiniflow#15446 component portion: add Thinking field to LLMParam,
  LLMInput, and ChatInvokeRequest. mergeLLMParam reads
  inputs["thinking"] with a whitelist of {"enabled","disabled"}
  (matching python llm.py:78-79); arbitrary strings are
  rejected. The provider policy portion (Qwen/Kimi/GLM in
  rag/llm/chat_model.py) belongs to internal/llm/ and is a
  separate porting stream.

Total: 4 new tests across 3 modified test files. All touched
package tests pass (1697 + 4 skipped). The 1 failing test
(TestAgent_ReActExhaustsSteps) is the pre-existing flaky test
that also fails on the baseline without my changes.

Refs: .claude/plans/review-and-port-py-agent-changes.md
Refs: infiniflow#16169 infiniflow#15457 infiniflow#15145 infiniflow#15446
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Jun 29, 2026
Ports 4 M-effort PRs from .claude/plans/review-and-port-py-agent-changes.md
Execution snapshot (all merged upstream) to the Go agent side.

Group 4 - API auth ports
- infiniflow#16169 Sandbox artifact ownership: add UserCanvasDAO.Accessible
  (owner-or-team predicate) and DocumentService.sandboxArtifactAccessible
  to gate GET /api/v1/documents/artifact/<filename>. Query
  API4Conversation for sessions owned by userID whose message blob
  references the filename (or its documents/artifact/<name> URL
  form); require at least one accessible canvas. Handler now
  fetches the current user and passes userID into the service;
  denial returns ErrArtifactNotFound to avoid cross-user
  enumeration.
- infiniflow#15457 Tenant ownership on agentbots: Go side already had the
  loadCanvas IDOR guard at the entry of both AgentbotInputs and
  AgentbotCompletion. Added a cross-tenant regression test
  (tenant-B asks for tenant-A's canvas -> ErrUserCanvasNotFound).
- infiniflow#15145 Rerun agent document access: add DocumentService.Accessible
  (loads doc, checks kbDAO.Accessible). Wire documentService into
  AgentHandler via WithDocumentService (nil-tolerant, preserves
  the existing NewAgentHandler signature for tests). RerunAgent
  returns "Document not found." when accessible check fails;
  cmd/server_main.go wires documentService after construction.

Group 2 - thinking switch
- infiniflow#15446 component portion: add Thinking field to LLMParam,
  LLMInput, and ChatInvokeRequest. mergeLLMParam reads
  inputs["thinking"] with a whitelist of {"enabled","disabled"}
  (matching python llm.py:78-79); arbitrary strings are
  rejected. The provider policy portion (Qwen/Kimi/GLM in
  rag/llm/chat_model.py) belongs to internal/llm/ and is a
  separate porting stream.

Total: 4 new tests across 3 modified test files. All touched
package tests pass (1697 + 4 skipped). The 1 failing test
(TestAgent_ReActExhaustsSteps) is the pre-existing flaky test
that also fails on the baseline without my changes.

Refs: .claude/plans/review-and-port-py-agent-changes.md
Refs: infiniflow#16169 infiniflow#15457 infiniflow#15145 infiniflow#15446
yuzhichang added a commit that referenced this pull request Jun 30, 2026
)

Mirrors 14 merged upstream PRs into the Go agent port.

PRs ported:
  - #15609 ExeSQL SSRF guard + DNS pin
  - #15436 HTTP timeout on external API tools
  - #16363 be_output restore + DeepL error path
  - #15644 switch no longer matches empty condition
  - #15374 session_id bind to path agent_id (DAO idor guard)
  - #16169 sandbox artifact ownership gate
  - #15457 tenant ownership on agentbots
  - #15145 rerun agent document access check
- #15446 thinking switch (component portion; provider policy lives in
internal/llm)
  - #15426 Invoke URL/proxy SSRF + DNS pin + no-redirects
  - #15238 agentbot thinking-logs beta endpoint
  - #14589 UserFillUp SSE event propagation
  - #14890 anonymous webhook opt-in
- #15068 PipelineChunker new component (text/file_ref/parser_id
dispatch; file-format extraction is a follow-up)

40 files, +2355 / -58 lines. 33 new tests, all targeted package suites
pass (1721 + 4 skipped); 1 pre-existing flaky test unrelated.
yuzhichang added a commit to ondery/ragflow that referenced this pull request Jul 1, 2026
…sion/user + input/output to Langfuse for agent runs

Rebuilt on current upstream/main after force-push; cherry-pick of the 7
PR-original commits collapsed into a single net diff to avoid conflicts
with intervening commits pulled in by repeated merges of upstream/main.

Original PR work (commits dropped during rebuild because their content
already lives on upstream/main or was a merge of upstream/main):
  c7339ae Enhance LLMService with token usage reporting
  0266cf0 Implement token usage tracking and Langfuse integration
  ab2b267 Include session_id in run_kwargs
  8bf937c Implement token usage tracking in chat model
  c955988 Enhance token tracking with context variables and functions
  3e88ed5 fix(agent): address CodeRabbit review on token usage tracking
  74b8c8c fix(agent): address CodeRabbit follow-up review

Forced-upstream duplicates dropped (already merged to main):
  70546ea (infiniflow#16396), 5b09910 (infiniflow#16403), 5d7f0fd (infiniflow#16405),
  730f33b (infiniflow#16407), a06343e (infiniflow#16408), f90be41 (infiniflow#16410),
  c4fe68e (infiniflow#16409), d4a0e71 (infiniflow#14773), ef42fd7 (infiniflow#15436),
  ab1015d (infiniflow#16363), db188cc (infiniflow#15446), 56ece68 (infiniflow#15609),
  2589b6e (infiniflow#15644), 74c2944 (infiniflow#15374), 78832ff (infiniflow#14985),
  bf18b59 (infiniflow#15457), 6c87225 (infiniflow#14890), e16d1a0 (infiniflow#15426),
  4712fcb (infiniflow#16169), 0536233 (infiniflow#14589), 08c807a (infiniflow#15145)

Plus 18 'Merge branch main into main' commits dropped (polluted topology).
yuzhichang added a commit to ondery/ragflow that referenced this pull request Jul 1, 2026
…sion/user + input/output to Langfuse for agent runs

Rebuilt on current upstream/main after force-push; cherry-pick of the 7
PR-original commits collapsed into a single net diff to avoid conflicts
with intervening commits pulled in by repeated merges of upstream/main.

Original PR work (commits dropped during rebuild because their content
already lives on upstream/main or was a merge of upstream/main):
  c7339ae Enhance LLMService with token usage reporting
  0266cf0 Implement token usage tracking and Langfuse integration
  ab2b267 Include session_id in run_kwargs
  8bf937c Implement token usage tracking in chat model
  c955988 Enhance token tracking with context variables and functions
  3e88ed5 fix(agent): address CodeRabbit review on token usage tracking
  74b8c8c fix(agent): address CodeRabbit follow-up review

Forced-upstream duplicates dropped (already merged to main):
  70546ea (infiniflow#16396), 5b09910 (infiniflow#16403), 5d7f0fd (infiniflow#16405),
  730f33b (infiniflow#16407), a06343e (infiniflow#16408), f90be41 (infiniflow#16410),
  c4fe68e (infiniflow#16409), d4a0e71 (infiniflow#14773), ef42fd7 (infiniflow#15436),
  ab1015d (infiniflow#16363), db188cc (infiniflow#15446), 56ece68 (infiniflow#15609),
  2589b6e (infiniflow#15644), 74c2944 (infiniflow#15374), 78832ff (infiniflow#14985),
  bf18b59 (infiniflow#15457), 6c87225 (infiniflow#14890), e16d1a0 (infiniflow#15426),
  4712fcb (infiniflow#16169), 0536233 (infiniflow#14589), 08c807a (infiniflow#15145)

Plus 18 'Merge branch main into main' commits dropped (polluted topology).

Co-authored-by: yzc <[email protected]>
xugangqiang pushed a commit to xugangqiang/ragflow that referenced this pull request Jul 1, 2026
…iniflow#16455)

Mirrors 14 merged upstream PRs into the Go agent port.

PRs ported:
  - infiniflow#15609 ExeSQL SSRF guard + DNS pin
  - infiniflow#15436 HTTP timeout on external API tools
  - infiniflow#16363 be_output restore + DeepL error path
  - infiniflow#15644 switch no longer matches empty condition
  - infiniflow#15374 session_id bind to path agent_id (DAO idor guard)
  - infiniflow#16169 sandbox artifact ownership gate
  - infiniflow#15457 tenant ownership on agentbots
  - infiniflow#15145 rerun agent document access check
- infiniflow#15446 thinking switch (component portion; provider policy lives in
internal/llm)
  - infiniflow#15426 Invoke URL/proxy SSRF + DNS pin + no-redirects
  - infiniflow#15238 agentbot thinking-logs beta endpoint
  - infiniflow#14589 UserFillUp SSE event propagation
  - infiniflow#14890 anonymous webhook opt-in
- infiniflow#15068 PipelineChunker new component (text/file_ref/parser_id
dispatch; file-format extraction is a follow-up)

40 files, +2355 / -58 lines. 33 new tests, all targeted package suites
pass (1721 + 4 skipped); 1 pre-existing flaky test unrelated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GET /documents/artifact/<filename> allows cross-user fetch of CodeExec sandbox artifacts (no ownership check)

2 participants