Skip to content

fix(protonpass): support pass-cli >= 2.0.3 item list shape#106

Merged
domenkozar merged 1 commit into
mainfrom
fix/protonpass-pass-cli-2.0.3
Jun 15, 2026
Merged

fix(protonpass): support pass-cli >= 2.0.3 item list shape#106
domenkozar merged 1 commit into
mainfrom
fix/protonpass-pass-cli-2.0.3

Conversation

@domenkozar

Copy link
Copy Markdown
Member

Problem

The protonpass provider is incompatible with Proton Pass CLI pass-cli >= 2.0.3. secretspec check/run report active secrets as missing.

pass-cli 2.0.3 (protonpass/pass-cli 1c09fd8) changed the JSON shape of item list --output json. List entries became ItemSummary objects:

  • <= 2.0.2: title nested under content.title
  • >= 2.0.3: title moved to the top level and the per-item content object was dropped from list output entirely (id/share_id stayed 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

  • Split list parsing into a dedicated ProtonPassListItem struct with an optional top-level title and an optional legacy nested content, plus a title() accessor that prefers the top-level field and falls back to the nested one. Both pass-cli shapes now deserialize.
  • Updated set() (find existing item to replace) and get_batch() (map title → share_id/id) to use title().
  • item view output is unchanged across versions, so the get path is untouched (trimmed the now-unused id/share_id from the view struct).
  • Added regression tests parsing both the legacy nested and new top-level list shapes.

Fixes #104

Testing

cargo test --package secretspec provider::protonpass — 8 passed. cargo fmt --check and cargo clippy clean (via pre-commit).

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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>
@domenkozar domenkozar force-pushed the fix/protonpass-pass-cli-2.0.3 branch from e99780b to 3464eb1 Compare June 15, 2026 20:24
@domenkozar domenkozar merged commit b2c8eca into main Jun 15, 2026
9 of 10 checks passed
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.

protonpass provider incompatible with pass-cli >= 2.0.3

1 participant