picoclaw/pkg/channels/wecom
wenjie 8c2a9332c6
fix(security): harden unauthenticated tool-exec paths (#1360)
* fix(security): harden unauthenticated tool-exec paths (GHSA-pv8c-p6jf-3fpp)

- Exec tool: channel-based access control (default deny remote)
- Cron tool: command scheduling restricted to internal channels
- Web fetch: SSRF defense-in-depth (pre-flight + dial-time + redirect checks)
- File permissions: session/state dirs 0700, files 0600
- Registry: inject __channel/__chat_id into tool args (replaces racy SetContext)

28 new security regression tests.

(cherry picked from commit 191446ae19021604d3d5b0d9376b9655ab749105)

* fix(exec): revalidate working_dir before command start

* test(web): allow local oversized payload fixture

---------

Co-authored-by: xj <gh-xj@users.noreply.github.com>
2026-03-11 19:22:20 +08:00
..
aibot.go fix: handle ignored io.ReadAll errors across codebase 2026-03-05 20:56:38 +09:00
aibot_test.go refactor(wecom): replace generateSignature with computeSignature and update related tests 2026-03-02 17:42:54 +08:00
app.go fix: resolve merge conflicts in wecom error handling 2026-03-05 22:01:32 +09:00
app_test.go fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
bot.go fix: resolve merge conflicts in wecom error handling 2026-03-05 22:01:32 +09:00
bot_test.go fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
common.go fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
dedupe.go fix(wecom): replace dedupe map rotation with circular queue 2026-03-02 18:50:51 +03:00
dedupe_test.go fix(wecom): resolve upstream rebase conflicts after channel refactor 2026-03-02 18:54:11 +03:00
init.go Add WeCom AIBot channel implementation and tests 2026-03-02 17:42:42 +08:00