Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions apparmor.d/profiles-s-z/yara
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Zane Zakraisek <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>
include <tunables/booleans>

@{exec_path} = {/usr,}/bin/yara
profile yara @{exec_path} {
include <abstractions/base>

@{exec_path} mr,

capability dac_override dac_read_search,

if $ANTIVIRUS_CAN_PTRACE {
ptrace (read, trace),
capability sys_ptrace,
}

/{,**} r,

deny capability sys_admin,

include if exists <local/yara>
}

# vim:syntax=apparmor
9 changes: 9 additions & 0 deletions apparmor.d/tunables/booleans
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
##################################################
# Allows AV programs to scan memory using ptrace
# functionality.
#
# This grants read and trace permissions.
#
# Default: false
##################################################
$ANTIVIRUS_CAN_PTRACE = false
Loading