fgimenez@localhost:~$ su test -c 'sh -c "SNAP_NAME=test-snapd-tools /snap/core/current/usr/lib/snapd/snap-confine snap.test-snapd-tools.cmd /bin/true 2>&1"'
Password:
snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks
fgimenez@localhost:~$ sudo su test -c 'sh -c "SNAP_NAME=test-snapd-tools /snap/core/current/usr/lib/snapd/snap-confine snap.test-snapd-tools.cmd /bin/true 2>&1"'
snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks