fix(protonpass): support pass-cli >= 2.0.3 item list shape#106
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
secretspec | 3464eb1 | Commit Preview URL Branch Preview URL |
Jun 15 2026, 08:25 PM |
pass-cli 2.0.3 (protonpass/pass-cli commit 1c09fd8) changed the JSON shape of `item list --output json`: the item title moved from a nested `content.title` to a top-level `title`, and the per-item `content` object was dropped from list output. The provider required `content`, so the parse failed on newer pass-cli and silently fell back to an empty item list, making secretspec report active secrets as missing. Accept both the legacy (<= 2.0.2) nested and new (>= 2.0.3) top-level list shapes via a dedicated ProtonPassListItem struct with a title() accessor, and add regression tests for both layouts. Fixes #104 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e99780b to
3464eb1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
protonpassprovider is incompatible with Proton Pass CLIpass-cli >= 2.0.3.secretspec check/runreport active secrets as missing.pass-cli 2.0.3(protonpass/pass-cli1c09fd8) changed the JSON shape ofitem list --output json. List entries becameItemSummaryobjects:<= 2.0.2: title nested undercontent.title>= 2.0.3:titlemoved to the top level and the per-itemcontentobject was dropped from list output entirely (id/share_idstayed top-level)The provider deserialized list items into a struct that required
content, so on newer pass-cli the parse failed and the code silently fell back to an empty list (.unwrap_or(... { items: vec![] })) — hence the "missing" secrets.Fix
ProtonPassListItemstruct with an optional top-leveltitleand an optional legacy nestedcontent, plus atitle()accessor that prefers the top-level field and falls back to the nested one. Both pass-cli shapes now deserialize.set()(find existing item to replace) andget_batch()(map title → share_id/id) to usetitle().item viewoutput is unchanged across versions, so thegetpath is untouched (trimmed the now-unusedid/share_idfrom the view struct).Fixes #104
Testing
cargo test --package secretspec provider::protonpass— 8 passed.cargo fmt --checkandcargo clippyclean (via pre-commit).🤖 Generated with Claude Code