Gitea firejail profile
Firejail security sandbox uses Linux namespaces and seccomp-bpf in order to isolate processes.
Working firejail profile for Gitea (and maybe Gogs):
# Persistent local customizations
include /etc/firejail/default.local
# Persistent global definitions
include /etc/firejail/globals.local
include /etc/firejail/disable-common.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/disable-programs.inc
caps.keep setgid,setuid,net_bind_service,chown
ipc-namespace
netfilter
no3d
nodvd
nogroups
nonewprivs
noroot
nosound
notv
novideo
protocol unix,inet,inet6
seccomp
shell none
disable-mnt
private
private-bin gitea,git,git-upload-pack,git-receive-pack,bash,/bin/env,cat,/bin/basename,/bin/sh
private-dev
private-etc none
private-lib
private-tmp
memory-deny-write-execute
writable-var