Skip to content

Fix:local sandbox policy feedback - #10096

Merged
RC-CHN merged 3 commits into
AstrBotDevs:masterfrom
RC-CHN:fix/local-sandbox-policy-feedback
Sep 15, 2026
Merged

RC-CHN merged 3 commits into
AstrBotDevs:masterfrom
RC-CHN:fix/local-sandbox-policy-feedback

Conversation

@RC-CHN

@RC-CHN RC-CHN commented Sep 15, 2026

Copy link
Copy Markdown
Member

Local file access scopes can be unclear, especially in Docker deployments. Also, local Shell/Python tools currently return execution errors without explaining the active network policy, so agents may repeatedly retry blocked network operations using different tools or protocols.

Modifications / 改动点

  • Add descriptions below the local permission table explaining workspace access and host file access, including operating-system permissions and Docker boundaries. Include Chinese, English, Japanese, and Russian translations.

  • Add a shared network-policy notice to local Shell/Python tool results when network access is disabled. The notice explains that switching commands, Python, HTTP/HTTPS, or disabling certificate verification does not remove the restriction.

  • Preserve original output and errors without attributing every failure to the sandbox policy. Results remain unchanged when network access is allowed.

  • Extend existing tests to cover policy notices for running, completed, failed, and exceptional execution results.

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果


Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txtpyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Clarify local sandbox access and network restrictions across permission settings and local execution tools.

New Features:

  • Add localized guidance explaining workspace and host file access boundaries in the local permission settings.
  • Inform local Shell and Python tool users when network access is disabled and discourage ineffective retries through alternate protocols or tools.

Bug Fixes:

  • Clarify local sandbox limitations without misattributing ordinary command or code failures to the sandbox policy.

Enhancements:

  • Preserve existing tool output and error details while consistently reporting the active network policy.
  • Keep tool responses unchanged when local network access is permitted.

Tests:

  • Extend Shell and Python execution tests to cover network-policy notices across successful, failed, running, completed, and exceptional results.

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. This changes the network permission passed to local Shell and Python sandboxes, so an incorrect policy mapping could allow unauthorized network access and expose data, or unexpectedly block required operations. Reverting restores the prior behavior, but any data exposed or network-side effects that occurred while the change was active cannot be undone.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@RC-CHN
RC-CHN merged commit fce1bbc into AstrBotDevs:master Sep 15, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant