mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-06 10:15:08 +01:00
1cfe802172
See #208
162 lines
3.9 KiB
Text
162 lines
3.9 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/pass
|
|
profile pass @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/{,ba,da}sh rix,
|
|
@{bin}/base64 rix,
|
|
@{bin}/cat rix,
|
|
@{bin}/cp rix,
|
|
@{bin}/diff rix,
|
|
@{bin}/dirname rix,
|
|
@{bin}/env rix,
|
|
@{bin}/find rix,
|
|
@{bin}/getopt rix,
|
|
@{bin}/grep rix,
|
|
@{bin}/head rix,
|
|
@{bin}/mkdir rix,
|
|
@{bin}/mktemp rix,
|
|
@{bin}/mv rix,
|
|
@{bin}/pkill rix,
|
|
@{bin}/rm rix,
|
|
@{bin}/rmdir rix,
|
|
@{bin}/sed rix,
|
|
@{bin}/shred rix,
|
|
@{bin}/sleep rix,
|
|
@{bin}/sort rix,
|
|
@{bin}/tail rix,
|
|
@{bin}/touch rix,
|
|
@{bin}/tr rix,
|
|
@{bin}/tree rix,
|
|
@{bin}/tty rix,
|
|
@{bin}/which rix,
|
|
|
|
@{bin}/git rCx -> git,
|
|
@{lib}/git{,-core}/git rCx -> git,
|
|
@{bin}/gpg{2,} rCx -> gpg,
|
|
@{bin}/qdbus rCx -> qdbus,
|
|
@{bin}/vim{,.*} rCx -> editor,
|
|
@{bin}/wl-{copy,paste} rPx,
|
|
@{bin}/xclip rPx,
|
|
|
|
# Pass extensions
|
|
@{bin}/oathtool rix, # pass-otp
|
|
@{bin}/python3.@{int} rPx -> pass-import, # pass-import
|
|
@{bin}/qrencode rPUx, # pass-otp
|
|
@{bin}/tomb rPUx, # pass-tomb
|
|
|
|
/usr/share/terminfo/x/xterm-256color r,
|
|
|
|
owner @{user_password_store_dirs}/{,**} rw,
|
|
owner /dev/shm/pass.*/{,*} rw,
|
|
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pids}/cmdline r,
|
|
@{PROC}/sys/kernel/osrelease r,
|
|
@{PROC}/uptime r,
|
|
|
|
/dev/tty rw,
|
|
|
|
profile editor {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
@{bin}/vim{,.*} mrix,
|
|
|
|
/etc/vim/{,**} r,
|
|
/etc/vimrc r,
|
|
/usr/share/terminfo/x/xterm-256color r,
|
|
/usr/share/vim/{,**} r,
|
|
/tmp/ r,
|
|
|
|
owner @{HOME}/.fzf/plugin/ r,
|
|
owner @{HOME}/.fzf/plugin/fzf.vim r,
|
|
owner @{HOME}/.viminf{o,z}{,.tmp} rw,
|
|
|
|
owner @{user_password_store_dirs}/{,**/} r,
|
|
|
|
owner @{user_cache_dirs}/vim/{,**} rw,
|
|
owner @{user_config_dirs}/vim/{,**} rw,
|
|
owner /dev/shm/pass.*/{,*} rw,
|
|
|
|
deny owner @{HOME}/ r,
|
|
|
|
include if exists <local/pass_editor>
|
|
}
|
|
|
|
profile git {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/openssl>
|
|
include <abstractions/ssl_certs>
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink raw,
|
|
|
|
@{bin}/git* mrix,
|
|
@{lib}/git{,-core}/git* mrix,
|
|
|
|
@{bin}/pager rPx -> child-pager,
|
|
@{bin}/less rPx -> child-pager,
|
|
@{bin}/more rPx -> child-pager,
|
|
|
|
@{bin}/gpg{2,} rPx -> pass//gpg,
|
|
|
|
/usr/share/git{,-core}/{,**} r,
|
|
|
|
owner @{HOME}/.gitconfig r,
|
|
owner @{user_config_dirs}/git/{,*} r,
|
|
|
|
owner @{user_password_store_dirs}/ rw,
|
|
owner @{user_password_store_dirs}/** rwkl -> @{HOME}/.password-store/**,
|
|
|
|
owner /tmp/.git_vtag_tmp@{rand6} rw, # For git log --show-signature
|
|
|
|
include if exists <local/pass_git>
|
|
}
|
|
|
|
profile gpg {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability dac_read_search,
|
|
|
|
@{bin}/gpg{,2} mr,
|
|
|
|
owner @{HOME}/@{XDG_GPG_DIR}/ rw,
|
|
owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**,
|
|
|
|
owner @{user_password_store_dirs}/ rw,
|
|
owner @{user_password_store_dirs}/** rwkl -> @{HOME}/.password-store/**,
|
|
owner /dev/shm/pass.*/{,*} rw,
|
|
owner /tmp/.git_vtag_tmp@{rand6} rw, # For git log --show-signature
|
|
|
|
owner /dev/pts/@{int} rw,
|
|
|
|
include if exists <local/pass_gpg>
|
|
}
|
|
|
|
profile qdbus {
|
|
include <abstractions/base>
|
|
|
|
@{bin}/qdbus mr,
|
|
|
|
include if exists <local/pass_qdbus>
|
|
}
|
|
|
|
include if exists <usr/pass.d>
|
|
include if exists <local/pass>
|
|
}
|