I was wondering if there is way to check if a snap was installed with --dangerous flag, the sanp list command gives at-least a hint for devmode but not for dangerous . I even tried the snapd api /v2/snaps but the output also did not gave any info .
There’s two things indicating that a snap is “local”:
$ snap list
Name Version Rev Developer Notes
spread 2017.09.21 x1 -
$ snap info spread
[...]
publisher:
The revision number is prefixed with “x” and there is no publisher. I think the revision number could be like that if the store you got the snap from used such revision numbers, but the lack of publisher should be clear indication the snap was installed with the --dangerous option.
$ ./test-snap info --verbose spread
name: spread
summary: Convenient full-system test (task) distribution
publisher:
license: unknown
description: |
Spread is a plesant way distribute full-system integration tests and
similar tasks. A few simple and concrete concepts that are fun to play
with and fix the exact piece missing in the puzzle. It's not Jenkins,
it's not Travis, it's not a library, not a language, and it's not even
specific to testing. It's a simple way to express what to run and
where, what to do before and after it runs, and how to duplicate jobs
with minor variations without copy & paste.
commands:
- spread
notes:
private: false
confinement: strict
devmode: false
jailmode: false
trymode: false
enabled: true
broken: false
dangerous: true
ignore-validation: false
tracking:
installed: 2018.01.23 (x1) 2MB
refreshed: 2018-01-24 03:13:24 +0100 CET
channels:
stable: 2018.01.23 (34) 2MB -
candidate: 2018.01.23 (34) 2MB -
beta: 2018.01.23 (34) 2MB -
edge: 2018.01.23 (34) 2MB -