Thanks for responses
The end goal is actually to get the list of validation assertions for a given snap, and hence to know which snap is currently valid according to policy.
Let me explain the problem a little more.
When we build an Ubuntu Core image, it includes the snap revisions as specified by the snap channels in the model assertion. For snaps that are gated, than means the image likely contains a revision of the snap that is not asserted. So when the image bootraps itself, at some point the gated snap is then downgraded.
We want to determine the correct snap revision of a gated snap for a given UC image, download it and pass it to the image build process specifically. That should ensure we have the correct gated revision from the start, and no snap downgrade takes place.
What do you think is the best way to achieve this is ?