# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/onefetch
@{att} = ""
profile onefetch /{,usr/}bin/onefetch flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/ssl_certs>

  @{exec_path} mr,

  @{bin}/git  rpx,
  @{lib}/git{,-core}/git rpx,

  owner @{user_config_dirs}/git/{,**} r,
  owner @{user_projects_dirs}/{,**} r,

  owner @{PROC}/@{pid}/cgroup r,
  owner @{PROC}/@{pid}/stat r,

  include if exists <local/onefetch>
}

# vim:syntax=apparmor
