fix(ci): accept QMD sandbox exclusion and satisfy ruff E731
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 13s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 18s
CI / PowerShell tests on Ubuntu (push) Failing after 51s
CI / Installed client configuration smoke tests (push) Canceled after 54s
CI / Bash integration and installation guards (push) Canceled after 55s
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 13s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 18s
CI / PowerShell tests on Ubuntu (push) Failing after 51s
CI / Installed client configuration smoke tests (push) Canceled after 54s
CI / Bash integration and installation guards (push) Canceled after 55s
- validate-config: allow sandbox.excludedCommands only with the exact QMD search command, keeping the sandbox fail-closed - shell package tests: expect the excludedCommands entry - tests: replace assigned lambdas with functions (ruff E731) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09e8e832ed
commit
49636323f0
5 files changed
+15
-7
No files matched your search
@@ -12,7 +12,9 @@ from pathlib import Path
|
||||
|
||||
CLAUDE_TOP_LEVEL = {"permissions", "sandbox", "env", "statusLine", "hooks"}
|
||||
CLAUDE_PERMISSION_KEYS = {"defaultMode", "allow", "deny"}
|
||||
CLAUDE_SANDBOX_KEYS = {"enabled", "allowUnsandboxedCommands", "failIfUnavailable", "network"}
|
||||
CLAUDE_SANDBOX_KEYS = {"enabled", "allowUnsandboxedCommands", "failIfUnavailable", "excludedCommands", "network"}
|
||||
# The only command allowed outside the sandbox: QMD search needs its localhost daemon and home-directory index.
|
||||
CLAUDE_SANDBOX_EXCLUDED = ['node "$HOME/.my-ai-configuration/qmd/qmd-search.mjs" *']
|
||||
CLAUDE_STATUS_LINE_KEYS = {"type", "command"}
|
||||
CLAUDE_HOOK_KEYS = {"type", "command", "timeout"}
|
||||
CLAUDE_PERMISSION_MODES = {"acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan"}
|
||||
@@ -42,6 +44,7 @@ def validate_claude(path: Path) -> None:
|
||||
fail(f"permissions.{key} must be an array of strings")
|
||||
sandbox = require_keys(settings.get("sandbox"), CLAUDE_SANDBOX_KEYS, "sandbox")
|
||||
if sandbox != {"enabled": False} and sandbox != {"enabled": True, "allowUnsandboxedCommands": False, "failIfUnavailable": True,
|
||||
"excludedCommands": CLAUDE_SANDBOX_EXCLUDED,
|
||||
"network": {"allowedDomains": ["mcp.context7.com"]}}:
|
||||
fail("sandbox must be disabled or enabled with fail-closed settings")
|
||||
env = settings.get("env")
|
||||
|
||||
Reference in new issue
Block a user