Skip to content

Built-in agent presets ship with AutoUnseal=true, bypassing sealed-secret protection (+5 more)#204

Merged
danieljustus merged 9 commits into
mainfrom
session/20260522-151856
May 22, 2026
Merged

Built-in agent presets ship with AutoUnseal=true, bypassing sealed-secret protection (+5 more)#204
danieljustus merged 9 commits into
mainfrom
session/20260522-151856

Conversation

@danieljustus
Copy link
Copy Markdown
Owner

@danieljustus danieljustus commented May 22, 2026

Bundles fixes for multiple open issues. The list below grows as commits land; every linked issue will close automatically on merge.

Milestone: v4.0.1

Built-in agent profiles were hardcoded with AutoUnseal=true, which
unconditionally bypassed the sealed-secret response path. This allowed
plaintext secrets to leak into LLM transcripts.

Change all built-in presets (default, claude-code, codex, hermes,
openclaw, opencode) to AutoUnseal=false so secrets are sealed by
default.

Closes #201
…cument them

The skill documentation did not recommend execute_with_secret or
execute_api_request as preferred tools, steering agents toward
get_entry_value + manual curl which leaks secrets into transcripts.

Update the skill doc to prominently feature the safe tools with
worked examples and anti-pattern callouts. Enable CanRunCommands
for named built-in agent profiles (claude-code, codex, hermes,
openclaw, opencode) so they can actually use these tools.

Closes #203
…ith_secret

Agent-supplied env_vars were merged verbatim into the subprocess
environment, allowing LD_PRELOAD, NODE_OPTIONS, BASH_ENV, and similar
injection vectors. Add a denylist covering loader and interpreter
injection variables, reject requests containing them before execution,
and surface the command and env-var keys in the approval prompt so
human approvers can see what is actually being executed.

Closes #198
…terns

DetectSecretType already recognizes GitHub tokens, AWS keys, SSH keys,
and other secret types, but the result was never used to set
entry.Classification. This meant the sealed-secret protection in
tools_get.go never triggered for auto-detected secrets.

Add InferClassification() that scans entry.Data values and maps
detected secret types to taint.Classification levels. High-risk
secrets (SSH keys, certificates, TOTP seeds) map to Restricted;
tokens and API keys map to Secret; passwords map to Confidential.

The inference runs on every write and never lowers a manually-set
classification.

Closes #202
Deprecated MCP commands (mcp install, mcp-config, mcp-token-rotate,
mcp token) still showed full v3 behavior descriptions in --help,
confusing users. Replace with concise deprecation notices that name
the v4 replacements, hide the commands from top-level help, and
print migration hints to stderr on invocation.

Closes #200
listPseudonymized previously walked entries sequentially with no
caching, while the non-pseudonymized path used both an in-memory
cache and a bounded worker pool. This caused up to 2x sequential
age decryptions per find_entries call on pseudonymized vaults.

Add an mtime-invalidated in-memory cache for pseudonymized listings
and replace the serial walk with the same bounded worker pool used
by FindWithOptions. Reuse decrypted entries between the listing
pass and the second pass of FindWithOptions so each entry is
decrypted at most once per call.

Closes #199
@danieljustus danieljustus changed the title session/20260522 151856 Built-in agent presets ship with AutoUnseal=true, bypassing sealed-secret protection (+5 more) May 22, 2026
danieljustus added a commit that referenced this pull request May 22, 2026
- Apply gofmt to cmd/mcp/mcp_config.go, cmd/mcp/mcp_token.go, internal/mcp/server/tools_execute_with_secret.go
- Remove unused agentWriteConfig variable from cmd/mcp/agent.go
- Update tests to not pass removed flags on deprecated mcp-config and mcp token commands
- Add Example field to mcpCmd

Refs PR #204
danieljustus added a commit that referenced this pull request May 22, 2026
- Apply gofmt to cmd/mcp/mcp_config.go, cmd/mcp/mcp_token.go, internal/mcp/server/tools_execute_with_secret.go
- Remove unused agentWriteConfig variable from cmd/mcp/agent.go
- Update tests to not pass removed flags on deprecated mcp-config and mcp token commands
- Add Example field to mcpCmd

Refs PR #204
@danieljustus danieljustus force-pushed the session/20260522-151856 branch from f6f9258 to 9156e2f Compare May 22, 2026 14:31
- Apply gofmt to cmd/mcp/mcp_config.go, cmd/mcp/mcp_token.go, internal/mcp/server/tools_execute_with_secret.go
- Remove unused agentWriteConfig variable from cmd/mcp/agent.go
- Update tests to not pass removed flags on deprecated mcp-config and mcp token commands
- Add Example field to mcpCmd

Refs PR #204
@danieljustus danieljustus force-pushed the session/20260522-151856 branch from 9156e2f to a0d0486 Compare May 22, 2026 14:42
danieljustus and others added 2 commits May 22, 2026 18:08
Upgraded golang.org/x/net v0.54.0 → v0.55.0 to resolve OSV
scanner findings (GO-2026-5025..5030).

Refs PR #204
@danieljustus danieljustus marked this pull request as ready for review May 22, 2026 16:25
Copilot AI review requested due to automatic review settings May 22, 2026 16:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@danieljustus danieljustus merged commit 3391817 into main May 22, 2026
21 of 22 checks passed
@danieljustus danieljustus deleted the session/20260522-151856 branch May 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment