Yes the AppArmor Firefox Profile seems to be enabled, by default, at least on my 22.04 machine,
because I see some entries for Firefox in the kernel log files, entered by AppArmor:
zgrep firefox /var/log/kern.log*
Result (simplified, oneline -> multiline):
/var/log/kern.log.1:Jun 28 17:47:16 xxxx kernel: [ 6901.642471]
apparmor="DENIED" operation="open" profile="snap.firefox.firefox"
name="..." pid=7330
comm="firefox"
requested_mask="r" denied_mask="r" fsuid=1001 ouid=0
I think the apparmor profile for the Firefox snap is in
/etc/apparmor.d/usr.bin.firefox
and I think you can add your own rules in
/etc/apparmor.d/local/usr.bin.firefox
which by default only contains these comments (on my 22.04)
# Site-specific additions and overrides for usr.bin.firefox.
# For more details, please see /etc/apparmor.d/local/README.
But I do not know how to do that, adding custom rules.
- The /etc/apparmor.d directory is not used for snaps (see my answer).