Snapcraft does not list keys reported from snapd via External Key Manager
Metadata
Current evaluation
snapcraft list-keys omits keys from snapd's External Key Manager when no keys are pre-registered. The bug lies in snapcraft_legacy/_store.py, which skips fetching keys in this scenario. Open, unassigned, awaiting triage and fix.
Suggested action: close stale
Reason: The issue is over 3.5 years old with zero maintainer interaction and explicitly references `snapcraft_legacy`, which has been deprecated and superseded by modern snapcraft. The reported behavior is no longer applicable to supported versions, making it stale and irrelevant.
Staleness:
95
Complexity:
30
Confidence:
80
Support Request:
5
Issue body
Hi Snapcraft Team,
snapcraft does not report the keys that are coming from the snapd if the account has no keys created and registered before.
When using my own account, I'm able to see the keys that are created and registered;
```
bugraaydogar@aydogar-ws:~$ snapcraft list-keys
Name SHA3-384 fingerprint
* uc-signing-key aaa
* serial bbb
* model ccc
- bugra-serial ddd (not registered)
- bugra-model eee (not registered)
```
The snapd also returns the mentioned keys above;
```
bugraaydogar@aydogar-ws:~$ snap keys
Name SHA3-384
uc-signing-key aaa
serial bbb
model ccc
bugra-serial ddd
bugra-model eee
```
After definition of the SNAPD_EXT_KEYMGR, I can fetch the following keys from the external key manager via snapd;
```
bugraaydogar@aydogar-ws:~$ snap keys
Name SHA3-384
ubuntu-core-model zzz
ubuntu-core-model-prod2 yyy
ubuntu-core-model-prod xxx
```
I can also see the output of the snapcraft list-keys.
```
bugraaydogar@aydogar-ws:~/$ snapcraft list-keys
Name SHA3-384 fingerprint
- ubuntu-core-model zzz (not registered)
- ubuntu-core-model-prod2 yyy (not registered)
- ubuntu-core-model-prod xxx (not registered)
```
However if there is an account with no keys registered previously, it does not report anything;
```
$ snapcraft list-keys
No keys have been registered. See 'snapcraft register-key --help' to register a key.
```
I think this is due to the following code;
https://github.com/snapcore/snapcraft/blob/main/snapcraft_legacy/_store.py#L442
I think, we should also cover the case where there is no keys registered to the store but snapd provides the keys.
Thanks,
Bugra
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| 2026-06-19 06:37:37.633332+00:00 | qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
30
Confidence:
80
Support Request:
5
|
close stale | snapcraft list-keys omits keys from snapd's External Key Manager when no keys are pre-registered. The bug lies in snapcraft_legacy/_store.py, which skips fetching keys in this scenario. Open, unassigned, awaiting triage and fix. |
| 2026-06-19 06:35:25.754583+00:00 | pending | — | — | — |