usestrix/strix · error · ValueError
scope_name required for create
Error message
scope_name required for create
What it means
In the Caido scope dispatcher, action='create' requires a scope_name; a missing or empty name raises ValueError before any network activity. Allowlist/denylist are optional — only the human-readable name is mandatory for creating a scope.
Source
Thrown at strix/tools/proxy/caido_api.py:519
async def _scope_rules_with_client(
client: CaidoClient,
action: ScopeAction,
*,
allowlist: list[str] | None = None,
denylist: list[str] | None = None,
scope_id: str | None = None,
scope_name: str | None = None,
) -> Any:
if action == "list":
result = await scope_list(client)
elif action == "get":
if not scope_id:
raise ValueError("scope_id required for get")
result = await scope_get(client, scope_id)
elif action == "create":
if not scope_name:
raise ValueError("scope_name required for create")
result = await scope_create(
client,
name=scope_name,
allowlist=allowlist,
denylist=denylist,
)
elif action == "update":
if not scope_id or not scope_name:
raise ValueError("scope_id and scope_name required for update")
result = await scope_update(
client,
scope_id,
name=scope_name,
allowlist=allowlist,
denylist=denylist,
)
elif action == "delete":
if not scope_id:View on GitHub (pinned to 8551339130)
Solutions
- Supply a descriptive scope_name alongside the filters: scope(client, 'create', scope_name='target-api', allowlist=[...]).
- If scripting, default scope_name from the target host to avoid empty values.
- Validate required-argument tables per action before calling the dispatcher.
Example fix
# before scope(client, "create", allowlist=["*target.com*"]) # after scope(client, "create", scope_name="target", allowlist=["*target.com*"])
Defensive patterns
Strategy: validation
Validate before calling
def create_scope_safe(client, name: str | None, allowlist=None, denylist=None):
name = (name or f"scope-{allowlist[0] if allowlist else 'default'}".replace("*", "")).strip()
if not name:
raise ValueError("scope_name required for create")
return scope(client, "create", scope_name=name, allowlist=allowlist, denylist=denylist) Try / catch
try:
scope(client, "create", scope_name=name, allowlist=al)
except ValueError as exc:
if "scope_name required" in str(exc):
raise SystemExit("provide --scope-name") from exc
raise Prevention
- Derive scope_name from the target host when the caller has no natural name.
- Make scope_name a required parameter in your wrapper/CLI schema.
- Check for whitespace-only names — strip() is not applied before the check here.
When it happens
Trigger: Calling the scope handler with action='create' and only allowlist/denylist filters but no scope_name. Common when a caller assumes the filters alone define the scope.
Common situations: LLM agent tool call omitting the name field; scripts translating a config of only URL patterns into a create action; empty-string name from an unset variable.
Related errors
- scope_id required for get
- scope_id and scope_name required for update
- scope_id required for delete
- Unknown action: {action}
- Invalid URL: {url}
AI-assisted analysis of usestrix/strix@8551339130 (2026-08-15).
Data as JSON: /api/errors/5283b45f29cdef24.
Report an issue: GitHub.