Skip to content

feat(security): default password_read to metadata-only (breaking)#13

Open
u2giants wants to merge 1 commit into
CakeRepository:masterfrom
u2giants:feat/reveal-default-hardening
Open

feat(security): default password_read to metadata-only (breaking)#13
u2giants wants to merge 1 commit into
CakeRepository:masterfrom
u2giants:feat/reveal-default-hardening

Conversation

@u2giants

Copy link
Copy Markdown
Contributor

What & why

By default, password_read currently returns the secret value in plaintext. In an MCP/agent setting that means simply reading a credential places it into the model's context and the conversation transcript — often when the agent only needed to confirm a secret exists or wanted to use it, not see it.

This PR makes the safe path the default:

  • password_read: reveal now defaults to false (metadata-only). Callers who genuinely need the plaintext pass reveal: true explicitly.
  • item_get: already conceals by default — unchanged behavior; only its description is updated.
  • Both tool descriptions now steer agents toward op_run (added in feat: add op_run and op_check_ref (use secrets without revealing plaintext) #12) as the way to use a secret without ever revealing its plaintext.

⚠️ Breaking change

password_read no longer returns the secret value unless reveal: true is passed. Any caller relying on the value coming back by default must add reveal: true. This is intentional — it trades a small ergonomic change for a meaningful reduction in accidental secret exposure.

Relationship to #12

This complements #12 (op_run / op_check_ref); the updated descriptions reference op_run. The two can be reviewed/merged independently — this PR stands on its own, but lands best alongside #12 so the "prefer op_run" guidance points at a tool that exists in-tree.

Tests

  • Updated the password_read secret-reference test to pass reveal: true where it asserts the value.
  • Added a test locking in the new metadata-only default (reveal omitted → no value returned).
  • npm run build && npm test green — 80 tests passing.

🤖 Generated with Claude Code

…toward op_run

Flips password_read's `reveal` default from true to false so that reading a
secret does not, by default, place its plaintext into the model context and
transcript. Callers who genuinely need the value pass `reveal: true`
explicitly. item_get already conceals by default; its description and
password_read's are updated to point agents at op_run as the way to USE a
secret without revealing it.

BREAKING CHANGE: password_read no longer returns the secret value unless
`reveal: true` is passed. Previously the value was returned by default.

Test updated to pass reveal explicitly where the value is asserted, plus a
new test locking in the metadata-only default. Build + 80 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
u2giants added a commit to u2giants/1Password-MCP that referenced this pull request Jul 16, 2026
…sitory#11; CakeRepository#12/CakeRepository#13 open)

PR CakeRepository#7 is closed — the maintainer merged its item tools upstream through his
own PR CakeRepository#11 (2026-07-04), so feat/item-get-edit-list is now historical, not the
base for an open PR. Adds an "Upstream contributions" section documenting how
new contributions are cut from fresh branches off upstream/master (genericizing
fork-only defaults like the vibe_coding vault allow-list) and tracking the two
currently-open PRs: CakeRepository#12 (op_run/op_check_ref) and CakeRepository#13 (reveal-default hardening).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant