strix icon indicating copy to clipboard operation
strix copied to clipboard

Strix 1.4.1 + strix-sandbox:1.1.0 Caido bootstrap hangs on project.select — createProject returns null to guest tokens

Open SaintGeele opened this issue 3 months ago • 2 comments

Bug: Strix 1.4.1 Caido bootstrap hangs on project.select(project.id) — createProject returns null to guest tokens in strix-sandbox:1.1.0

Environment

  • strix-agent 1.4.1 (released 2026-07-27)
  • strix-sandbox:1.1.0 (bundled in strix CLI on first run)
  • caido-sdk-client 0.3.0 (resolved from >=0.2.0; verified 0.2.0 source is identical)
  • Network mode: --network=host (because the new shared-network mode in v1.3.0 doesn't fit our VM resource model)
  • Target: local directory

Symptom

Strix CLI completes login, launches the sandbox container, Caido HTTP endpoint responds on the host-mapped port (e.g. 127.0.0.1:32771), loginAsGuest GraphQL mutation succeeds with a valid access token, but project.create({ name: "sandbox", temporary: true }) then hangs the next call (project.select) until the SDK executes its 30s timeout. Wrapper exit:

caido_sdk_client.errors.graphql.OperationUserError:
  Source: TimeoutError on Caido project.select GraphQL call

Direct repro

With the sandbox running and a guest token in hand (curl-able from outside the sandbox on the host port mapping), the GraphQL createProject returns a null project:

PORT=$(docker ps --format '{{.Ports}}' | grep -oE '127.0.0.1:[0-9]+->48080' | head -1 | cut -d: -f2 | cut -d- -f1)
TOKEN=$(curl -sf -X POST http://127.0.0.1:$PORT/graphql \
  -H 'Content-Type: application/json' \
  -d '{"query":"mutation { loginAsGuest { token { accessToken } } }"}' \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['loginAsGuest']['token']['accessToken'])")
echo "token=$TOKEN"  # works fine

curl -sf -X POST http://127.0.0.1:$PORT/graphql \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"query":"mutation { createProject(input: { name: \"smoke\", temporary: true }) { project { id name } } }"}'
# → {"data":{"createProject":{"project":null}}}

Same payload from a non-guest (admin-created) account presumably works — I haven't been able to test because Caido's auth model is closed-source and I can't create an admin without first getting past createProject.

What I've ruled out

  • SDK bug? caido-sdk-client 0.2.0 and 0.3.0 source diff for project.create and project.select is identical (both raise MissingExpectedValueError on null payload). Updated SDK from latest pip resolves; downgrading to 0.2.0 wouldn't change behavior.
  • Network/port resolution? In v1.3.0 strix added a shared-network port resolver that expects the sandbox on STRIX_DOCKER_SANDBOX_NETWORK. With --network=host, the parent's resolver fires and gets the host port mapping correctly. Sandbox container + Caido all reachable. Confirmed loginAsGuest works on that URL.
  • Resource exhaustion? Increased --memory from 2g → 3g. No change in behavior.

My read of the cause

The Caido server shipped with strix-sandbox:1.1.0 returns null to a guest token's createProject. The closed-source Caido permission model apparently changed so guests have read-only project access but not create-project — and the strix SDK doesn't handle the null gracefully (it just calls select(project.id) on the resulting object, which then times out the GraphQL handshake).

Two reasonable fixes:

  1. Caido docs / source change: re-grant create-project to guest tokens, OR ship a different bootstrap path in the sandbox that sets up an admin before project creation.
  2. strix-side: check createProject.project for null and either (a) retry with a different token flow, (b) use an existing project from a list query, or (c) surface a clear error instead of timing out.

Workaround in the meantime

I've parked Strix and pivoted to semgrep + trivy fs (run from outside the container; trivy is the trivy AQUA scanner, not Caido). Real-world value caught in our first scan: 15 HIGH CVEs flagged on a Next.js project, 90 seconds, no LLM tokens. So we're not blocked. But the Strix path is the more interesting one for our use case (live HTTP exploit automation, browser-based XSS/CSRF checks) and would be useful to get back to.

Repo / commit references

  • strix-agent 1.4.1: https://pypi.org/project/strix-agent/1.4.1/
  • caido-sdk-client 0.3.0: https://pypi.org/project/caido-sdk-client/
  • Caido repo (brand assets only): https://github.com/caido/caido

SaintGeele avatar Aug 04 '26 08:08 SaintGeele

😄🤝 RAG 这块切分粒度怎么定的

booneregina21833 avatar Aug 04 '26 17:08 booneregina21833

🧠⚙️ CI 配置可以当模板抄一份吗

blackwellmiranda8 avatar Aug 04 '26 17:08 blackwellmiranda8

😄🧠 暗色主题适配费劲吗

hortonkristen5 avatar Aug 04 '26 17:08 hortonkristen5

Tree-shaking 生效了吗 🤝

smithemily9 avatar Aug 04 '26 17:08 smithemily9

测试覆盖到关键路径了吗 ⚙️🤝⚙️

gibsoncaroline2876 avatar Aug 04 '26 17:08 gibsoncaroline2876

观测性方面推荐接哪类指标 📦⚙️

vangsteven2 avatar Aug 04 '26 18:08 vangsteven2

评测集有公开的吗,想对齐一下 🙌📦🔥

hollanddonald2 avatar Aug 04 '26 18:08 hollanddonald2

流式输出场景延迟表现如何 📦

hortonkristen5 avatar Aug 04 '26 18:08 hortonkristen5

API 设计很直觉,上手快 ✨

mckenziecraig554 avatar Aug 04 '26 18:08 mckenziecraig554

错误信息能不能再语义化一点 📌

hooperjohn8 avatar Aug 04 '26 18:08 hooperjohn8

🧪⭐ 贡献者指引写得很清楚

penaelizabeth137454 avatar Aug 04 '26 18:08 penaelizabeth137454

有没有更轻量的替代实现思路 😄📌

harrisgerald72 avatar Aug 04 '26 18:08 harrisgerald72

token 成本有没有做过粗算 📦💡😄

hicksamanda8854 avatar Aug 04 '26 18:08 hicksamanda8854

🧠 事务边界会不会过大

thompsoncrystal038 avatar Aug 04 '26 18:08 thompsoncrystal038

30-second status (issue author): I have parked the Strix path pending Caido permissions clarification / SDK robust null-handling. Real-world pivot was trivy fs (AQUA scanner) plus semgrep --config p/security-audit — first pass on a Next.js 16.2.2 target surfaced 15 HIGH CVEs in 90s end-to-end, no LLM tokens, no Caido dependency. So we are not blocked.

The original bug report (above) has a stable repro recipe (curl-able from outside the sandbox on the host port, guest token succeeds loginAsGuest but createProject returns {data:{createProject:{project:null}}}). Happy to attach the full session log if useful, but the surface area is small enough to fix in either direction:

  • Caido: grant createProject to guest tokens, OR ship a sandbox bootstrap path that creates an admin before project creation
  • strix-sdk: guard for createProject.project == null, list existing projects, or surface a clearer error instead of the 30s select() timeout

Will leave this open until either side moves. Closing the duplicated "watch this" issue tracker references I had on internal kanban.

SaintGeele avatar Aug 04 '26 19:08 SaintGeele

时钟漂移对签名校验影响大吗 👍😄

daviskathy6643 avatar Aug 04 '26 20:08 daviskathy6643

API 设计很直觉,上手快 🧪🙌

davenportjeffrey281 avatar Aug 04 '26 20:08 davenportjeffrey281

💡📦🧠 本地小模型能不能跑通演示

hollandkelsey520 avatar Aug 04 '26 20:08 hollandkelsey520

🧠✨ E2E 用例稳定率怎么样

wilsonbrenda62 avatar Aug 04 '26 20:08 wilsonbrenda62

打包体积还能再削一刀吗 💡

davismary52114 avatar Aug 04 '26 20:08 davismary52114