mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
A VM with network policy got secrets from the agents' settings files that Redact couldn't read or didn't look for: TOML lines it couldn't parse (multi-line arrays, quoted dotted keys, spaces around dots) were copied as they were, and JSON's string lists, URLs and env values under names that don't look secret were never scrubbed. Redact now parses each file whole (JSON with UseNumber, TOML with BurntSushi/toml), refuses one that doesn't parse, and writes the copy from what it parsed, through one walk for both formats: values under secret-looking keys, and lists and tables under them (but key bindings); every value of env and headers tables (env, environment, headers, http_headers, shell_environment_policy.set), but references, paths, URLs (scrubbed, or whole under a credential's name: credName) and true, false and numbers up to five digits; scrubURL for every URL; scrubArgs for every list; known key shapes anywhere. scrubArgs also scrubs URLs in arguments and in --flag=URL, for ~/.claude.json too. Claude Code's own settings env (settings.json's top-level env) keeps its documented configuration variables (claudeEnv: ANTHROPIC_MODEL and the model families, CLAUDE_CODE_*, DISABLE_*, MAX_*, *_TIMEOUT_MS), unless the name says it's a credential (credName: KEY, TOKEN as a word, SECRET, PASS, AUTH, CREDENTIAL, COOKIE, HEADER), so Claude in the VM keeps its model and limits. MCP servers' env and headers keep no value. Tests: TestRedactTOMLLeavesNothingUnread, TestRedactJSONArraysURLsAndEnv, TestRedactClaudeEnv (failing before), TestRedactTOML and TestRedactRefuses updated; sync.txtar's unreadable config.toml is now one that doesn't parse. Co-Authored-By: Claude Opus 5.5 <[email protected]>
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
# Each package's test coverage, in percent: the unit tests and the CLI tests together.
|
|
# mise run test fails when a package drops below its line; mise run coverage raises them.
|
|
cmd/devvm 100.0
|
|
internal/agentlogin 94.6
|
|
internal/backend 97.1
|
|
internal/backend/backendtest 74.4
|
|
internal/backend/lima 89.4
|
|
internal/backend/registry 100.0
|
|
internal/build 87.5
|
|
internal/cli 88.7
|
|
internal/cli/docgen 85.3
|
|
internal/daemon 97.9
|
|
internal/desktop 77.2
|
|
internal/devcontainer 96.8
|
|
internal/fetch 96.6
|
|
internal/from 91.3
|
|
internal/gitprotect 93.0
|
|
internal/hostgit 100.0
|
|
internal/hostsafety 85.0
|
|
internal/image 99.3
|
|
internal/jsonc 97.1
|
|
internal/msg 68.6
|
|
internal/msg/gen 93.3
|
|
internal/netpolicy 88.4
|
|
internal/paths 98.1
|
|
internal/platform 81.4
|
|
internal/ports 90.9
|
|
internal/project 92.6
|
|
internal/proxy 90.4
|
|
internal/redact 96.0
|
|
internal/secrets 91.7
|
|
internal/settings 96.1
|
|
internal/shell 100.0
|
|
internal/sshagent 84.2
|
|
internal/sshconfig 91.8
|
|
internal/state 94.0
|
|
internal/stubtest 81.0
|
|
internal/testbuild 100.0
|
|
internal/tools 89.4
|
|
internal/trust 94.1
|
|
internal/ubuntu 92.5
|
|
internal/ui 94.4
|
|
internal/vm 85.6
|
|
internal/vmname 100.0
|
|
internal/vmssh 88.7
|