← Back to issue list

snapcraft validate and sign-build are inconsistent when there are multiple keys

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1636979
Type
issue
State
open
Author
~elopio
Labels
store
Created
Updated
Closed
—

Current evaluation

Snapcraft validate silently uses the default signing key while sign-build prompts with multiple keys; the inconsistency is reproducible, but no resolution or maintainer decision is recorded.

Suggested action: keep open

Reason: The body provides a concrete two-key reproducer: validate requests the passphrase for default, while sign-build displays a numbered key selector. The store label and maintainer-authored report indicate it is triaged; current keys.py still implements the sign-build selector, and no resolving commit, PR, or maintainer decision is cited, so it should remain open pending a policy choice and fix.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 21 Complexity: 35 Confidence: 70 Actionability: 72

Issue body

When there are multiple signing keys, snapcraft sign-build shows a wizard-like text and lets you enter a number to select the key you want. snapcraft validate instead uses the default key. I'm not sure what's the right behaviour, but they should be consistent. $ snapcraft list-keys Name SHA3-384 fingerprint * default pvqbQVTvSgeMIuUXyr0d_4O_DLQNUDitvmficJ66KYcn_qZKDZcBT6XbgRm7Dcwb * test 5bsceVZqUkv01S4PxD10guWHQqvCNS7Mwv-I_U089NbcLhC-hnQ78zMGQGr9IZFN $ snapcraft validate u1test20161026 ubuntu-core=4 Getting details for ubuntu-core Signing validation ubuntu-core=4 You need a passphrase to unlock the secret key for user: "default" 4096-bit RSA key, ID D017FEB3, created 2016-01-01 $ snapcraft sign-build *.snap Select a key: Number Name SHA3-384 fingerprint 1 default pvqbQVTvSgeMIuUXyr0d_4O_DLQNUDitvmficJ66KYcn_qZKDZcBT6XbgRm7Dcwb 2 test 5bsceVZqUkv01S4PxD10guWHQqvCNS7Mwv-I_U089NbcLhC-hnQ78zMGQGr9IZFN Key number: 1 You need a passphrase to unlock the secret key for user: "default" 4096-bit RSA key, ID D017FEB3, created 2016-01-01

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 21
Complexity: 35
Confidence: 70
Actionability: 72
keep open Snapcraft validate silently uses the default signing key while sign-build prompts with multiple keys; the inconsistency is reproducible, but no resolution or maintainer decision is recorded.
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 18
Complexity: 25
Confidence: 55
Actionability: 70
keep open Inconsistency between snapcraft validate and sign-build when multiple signing keys exist: sign-build prompts for key selection, validate uses default key. Open with no maintainer response.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14
Staleness: 95
Complexity: 30
Confidence: 55
Support Request: 10
needs triage snapcraft validate uses the default signing key while sign-build shows a key-selection wizard when multiple keys exist; the two commands should behave consistently. Open since 2016, zero comments, no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 15
Confidence: 90
Support Request: 0
close stale Inconsistency between snapcraft validate and sign-build regarding key selection when multiple keys exist. Issue is completely inactive for ~9.7 years with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Inconsistency between snapcraft validate and sign-build when multiple signing keys exist. The issue is extremely stale with no maintainer interaction or activity in nearly a decade.
qwen3.6-35b-a3b-mtp-q6
Staleness: 99
Complexity: 20
Confidence: 85
Support Request: 5
close stale Inconsistency between snapcraft validate and sign-build regarding key selection when multiple keys exist. Issue is over 9 years old with no maintainer interaction.

Update history

Date Change
created

Related work

  • Related To: snapcraft#6208 (confidence 58%)

    Git history shows a later validate-command migration, but it does not demonstrate that key-selection behavior was corrected.

Related issues

Issue Project State Summary Similarity
#2104274 Snapcraft has unclear behavior when providing same build-snap from different channels snapcraft (launchpad) open Conflicting build-snap channels can install stable instead of an explicitly requested candidate; maintainers acknowledged the ambiguity, but no fix or conflict-resolution policy is recorded.
71%