Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1764 commits
Select commit Hold shift + click to select a range
9f6ce44
fix: various profiles fixes.
roddhjav Mar 14, 2026
ec149f5
fix(aa): parse: fix typo
roddhjav Mar 15, 2026
f3a497e
feat(aa): parse replaced slices.Contains with direct rune comparisons
roddhjav Mar 15, 2026
eec9de3
feat(aa): add parseContentRules instead of parseLines & Comma Rules.
roddhjav Mar 15, 2026
a227fcd
feat(aa): util: optimize compareFileAccess() and toAccess().
roddhjav Mar 15, 2026
94fa3ac
build: simplify attach and dbus tasks.
roddhjav Mar 15, 2026
2cda946
build: builder: add extractFlags() and setFlags() helpers.
roddhjav Mar 15, 2026
28daf8e
test(build): builder: add debug tests.
roddhjav Mar 15, 2026
db556ab
feat(build): dbus directive: make it usable outside of this project.
roddhjav Mar 15, 2026
296bb80
feat(directive): various optimisation in stack directive.
roddhjav Mar 15, 2026
e19610a
feat(directive): filter simplification.
roddhjav Mar 15, 2026
4fe1401
feat(directive): update tests to last changes.
roddhjav Mar 15, 2026
777ca3f
feat(aa-log): simplify GetApparmorLogs.
roddhjav Mar 15, 2026
421970c
feat(aa-log): remove redundant open/close in validateLogFile.
roddhjav Mar 15, 2026
dd82daf
feat(aa-log): optimize ignore slice to map.
roddhjav Mar 15, 2026
ef52736
feat(aa-log): add splitFields helper.
roddhjav Mar 15, 2026
1014f8d
build: enforce more profiles.
roddhjav Mar 15, 2026
16cf1c8
feat(profile): improve devs confinements.
roddhjav Mar 15, 2026
53c7fb9
feat(profile): small general update.
roddhjav Mar 15, 2026
f9aae29
feat(profile): add pkill and hugetop
roddhjav Mar 15, 2026
eb60753
feat(profile): small general update.
roddhjav Mar 15, 2026
21d70de
fix(profile): simplify sbctl
roddhjav Mar 15, 2026
ba68649
fix(profile): add pam_env and limits to the auth abs.
roddhjav Mar 15, 2026
7b01387
fix(profile): improve support with opensuse
roddhjav Mar 15, 2026
5f1f827
fix(profile): okular: add audio-client
roddhjav Mar 15, 2026
dea3cf4
fix(profile): few profiles fixes.
roddhjav Mar 15, 2026
f0b7543
doc: cleanup unfinished sentenses.
roddhjav Mar 16, 2026
3723e12
Merge branch 'main' of github.com:skarpinis/apparmor.d into skarpinis…
roddhjav Mar 16, 2026
192d04e
Merge branch 'patch' of github.com:valoq/apparmor.d into valoq-patch
roddhjav Mar 16, 2026
c783ce9
fix(build): fix minor parser bug.
roddhjav Mar 16, 2026
d348e10
fix(build): pci_bus has been cherry picked to all aa 4.1
roddhjav Mar 16, 2026
9b7bcb7
feat(profile): ensure we use any version of xtables.
roddhjav Mar 17, 2026
1a3a0cf
feat(profile): remove kube and cni profiles
roddhjav Mar 17, 2026
f75aa2d
Merge remote-tracking branch 'upstream/main'
skarpinis Mar 19, 2026
bce3120
fix(profile): pacman: do not specify link target.
roddhjav Mar 20, 2026
7013489
fix(profile): hwdb.bin link creation
roddhjav Mar 20, 2026
244ad16
build(debian): ensure apparmor is not loaded twice during update.
roddhjav Mar 20, 2026
436c6b5
feat(profile): update kde profiles.
roddhjav Mar 20, 2026
672e64d
feat(profile): update dbus rules.
roddhjav Mar 20, 2026
dc0bd28
Merge remote-tracking branch 'upstream/main'
skarpinis Mar 20, 2026
d8b6f80
fix(build): dist configure script.
roddhjav Mar 20, 2026
67340c7
Merge remote-tracking branch 'upstream/main'
skarpinis Mar 20, 2026
6132be0
feat(profile): minor updates
skarpinis Mar 20, 2026
5895769
feat(profile): remove rule
skarpinis Mar 20, 2026
e1536bd
feat(profile): additional rules added.
skarpinis Mar 20, 2026
774cad5
feat(abs): systemd: add access to /.
roddhjav Mar 20, 2026
52383c0
feat(profile): minor update.
roddhjav Mar 20, 2026
272e4cc
feat(profile): rewrite dbus rule for gnome calendar.
roddhjav Mar 20, 2026
6aea924
Release apparmor.d v0.4906
roddhjav Mar 20, 2026
cc2f30b
build: update release process.
roddhjav Mar 20, 2026
4c327f3
feat(abs): chromium: minor improvements.
roddhjav Mar 21, 2026
62206e7
feat(aa): add some profile utils.
roddhjav Mar 21, 2026
1cd6bb9
feat(profile): added more rules /.
skarpinis Mar 21, 2026
d8f2a75
feat(profile): again missing /.
skarpinis Mar 22, 2026
bde38c4
fix(profile): flatpak network add missing wireless.
roddhjav Mar 22, 2026
96ffc85
fix(profile): missing udev in upowerd
roddhjav Mar 22, 2026
f4d69ea
feat(profile): update YACReader.
roddhjav Mar 22, 2026
ce60d14
chore(aa-log): minor improvments.
roddhjav Mar 22, 2026
76aad7a
fix(profile): linter issue.
roddhjav Mar 22, 2026
d59d948
feat(profile): minor updates
skarpinis Mar 20, 2026
5bdf95a
feat(profile): remove rule
skarpinis Mar 20, 2026
fd15827
feat(profile): additional rules added.
skarpinis Mar 20, 2026
36e8eea
feat(profile): added more rules /.
skarpinis Mar 21, 2026
859b72c
feat(profile): again missing /.
skarpinis Mar 22, 2026
2a01708
Merge branch 'temp-main'
skarpinis Mar 22, 2026
c4b76ac
feat(profile): Resolved as suggested.
skarpinis Mar 22, 2026
5afa9b6
feat(profile): added missing /.
skarpinis Mar 24, 2026
a38ef7f
Update ufw-init
JND94 Mar 22, 2026
557ef87
feat(profile): various kde improvments.
roddhjav Mar 28, 2026
fd5925d
feat(abs): minor chromium based improvement.
roddhjav Mar 28, 2026
50fa944
feat(profile): improve dbus rules.
roddhjav Mar 28, 2026
7c0f58a
build(directive): dbus common -> dbus see.
roddhjav Mar 28, 2026
e4e71ad
feat(profile): minor update.
roddhjav Mar 28, 2026
cd4e81c
feat(profile): improve snap profiles.
roddhjav Mar 28, 2026
17156cd
build(debian): ensure the cache is not removed to often.
roddhjav Mar 28, 2026
da45b0b
tests(builder): add tests for profiles utils.
roddhjav Mar 28, 2026
a73dfd7
chore: cosmetic.
roddhjav Mar 28, 2026
f722e37
feat(profile): initial support for gnome 50 and ubuntu 26.04
roddhjav Mar 29, 2026
0b92d1e
feat(abs): better dbus rules.
roddhjav Mar 29, 2026
93817e7
feat(abs): add wayland-strict
roddhjav Mar 29, 2026
9726576
feat(abs): minor update on some core abs.
roddhjav Mar 29, 2026
b96e105
fix: ubuntu 26 still does not support transition to namespace.
roddhjav Mar 29, 2026
3c21c01
feat(profile): general update.
roddhjav Mar 29, 2026
df78866
feat(abs): minor abs update.
roddhjav Mar 29, 2026
988322d
feat(profile): minor profile update.
roddhjav Mar 29, 2026
efeffc8
feat(abs): add app/git abstraction.
roddhjav Mar 29, 2026
4c2c6e8
Draft: initial support for plasma-login-manager
Mar 17, 2026
4a33488
missing rule in startplasma
Mar 17, 2026
ae05108
add auth abs
Mar 17, 2026
6313704
fix startplasma-login-wayland
Mar 17, 2026
5b283de
feat(tunable): add plasmalogin to DESKTOP_HOME
roddhjav Mar 22, 2026
6aa261e
feat(profile): plasmalogin: add plasmalogin-shell
roddhjav Mar 22, 2026
c0d1cc6
feat(profile): add more plasma-login profiles.
roddhjav Mar 22, 2026
2261f02
feat(profile): integrate kde profiles with plasmalogin.
roddhjav Mar 22, 2026
a943305
feat(profile): add ksecretd.
roddhjav Mar 22, 2026
a38021b
Merge branch 'main' of github.com:skarpinis/apparmor.d into skarpinis…
roddhjav Mar 29, 2026
10e6825
Merge branch 'ddev'
roddhjav Mar 29, 2026
f652d9b
feat(aa): rewrite file rule sorting with regex-based group matching.
roddhjav Mar 29, 2026
583097c
feat(aa): validate peer modifiers and improve network/unix rule parsing
roddhjav Mar 29, 2026
a12d081
feat(aa): add user bin and lib dirs.
roddhjav Mar 29, 2026
dd3eb0c
feat(aa): improve parser robustness and validation
roddhjav Mar 29, 2026
5cede81
feat(aa): enhance validation and comparison in file rules and utilities
roddhjav Mar 29, 2026
94b0276
feat(aa): normalize signal set names
roddhjav Mar 29, 2026
2bde668
fix(aa): improve rule sorting, merging, and deduplication
roddhjav Mar 29, 2026
b984e24
feat(aa): add mount change flag validation and improve mount rule com…
roddhjav Mar 29, 2026
1244475
feat(aa): validate dbus bind and eavesdrop modifier constraints
roddhjav Mar 29, 2026
08f95a8
refactor(aa): extract flag parsing in Base and fix comment merge dedup
roddhjav Mar 29, 2026
e7033c8
fix(aa): require exec condition when change_profile has exec mode
roddhjav Mar 29, 2026
9b83eea
feat(aa): add missing mount flag conflict detection.
roddhjav Mar 29, 2026
93e98d9
feat(aa): extend parser with escape handling, new operators, and qual…
roddhjav Mar 29, 2026
cc753a5
feat(aa): parser: add some helper functions.
roddhjav Mar 29, 2026
3086ed0
feat(aa): extend profile flag validation and conflict detection
roddhjav Mar 29, 2026
0190733
fix(aa): handle missing mount operations and change_profile in log pa…
roddhjav Mar 29, 2026
8d9c2cf
fix(aa): fix mount source padding and pivot_root target profile rende…
roddhjav Mar 29, 2026
9e9bed2
tests(aa): update unit tests to the last changes.
roddhjav Mar 29, 2026
88d3af1
fix(aa): simplify embedded field selectors per staticcheck QF1008
roddhjav Mar 29, 2026
6d691c2
fix(profile): remove deprecated steam-runtime.
roddhjav Mar 29, 2026
f16e8a1
fix(profile): child profiles missing complain flag.
roddhjav Apr 1, 2026
141bd62
fix(profile): coredumpctl//gdb: gdb denials.
roddhjav Apr 1, 2026
4af9488
feat(profile): improve cpupower
roddhjav Apr 1, 2026
23cf0b7
feat(abs): add transparent_hugepage/enabled to base-strict.
roddhjav Apr 2, 2026
105c0c8
feat(profile): minor update.
skarpinis Apr 2, 2026
a986dca
fix(profile): systemd-cat greetd denial.
skarpinis Apr 2, 2026
4de5a28
build: move to a more classic version scheme.
roddhjav Apr 2, 2026
866fbf1
feat(profile): better use of the mime abstraction.
roddhjav Apr 2, 2026
fbae2e0
feat(abs): improve dev abstractions.
roddhjav Apr 2, 2026
6769643
feat(profile): minor update.
roddhjav Apr 2, 2026
6f2c8a2
plasma-login-greeter: add user icon
JND94 Mar 30, 2026
7b019cc
feat(profile): minor update.
skarpinis Apr 2, 2026
180708c
fix(profile): systemd-cat greetd denial.
skarpinis Apr 2, 2026
5c81b79
build: move to a more classic version scheme. (2)
roddhjav Apr 2, 2026
ec2821f
Release apparmor.d v0.4907.0
roddhjav Apr 2, 2026
6c9fdf1
feat(profile): add profile for solaar
roddhjav Apr 5, 2026
9147226
feat(abs): improve flatpak core abs.
roddhjav Apr 6, 2026
3755d8e
feat(abs): improve some core abs.
roddhjav Apr 6, 2026
f40c807
feat(abs): add sys/power-supply abs.
roddhjav Apr 6, 2026
b9246ac
feat(abs): add sys/amdgpu abs.
roddhjav Apr 6, 2026
e3d9d1c
feat(abs): add sys/input abs.
roddhjav Apr 6, 2026
a2ab76a
feat(abs): add sys/dmi abs.
roddhjav Apr 6, 2026
9a7fbc1
feat(profile): replace the freedesktop abs.
roddhjav Apr 6, 2026
cc84439
feat(profile): update systemd-ac-power.
roddhjav Apr 6, 2026
9354c91
feat(profile): systemd: add some ctl profile.
roddhjav Apr 6, 2026
db80b14
feat(profile): systemd: add systemd-bless-boot.
roddhjav Apr 6, 2026
ba4da80
feat(profile): add systemd-importd
roddhjav Apr 6, 2026
14a0072
feat(profile): add systemd-sysext and systemd-sysupdate.
roddhjav Apr 6, 2026
da23a89
feat(profile): general update.
roddhjav Apr 6, 2026
eeeed20
feat(profile): ensure child-systemctl can show systemd status.
roddhjav Apr 6, 2026
03871dd
feat(profile): add mullvad-exclude
roddhjav Apr 6, 2026
1c2f4f4
fix: too many profile transition.
roddhjav Apr 6, 2026
5a6e4e3
fix: linting issue.
roddhjav Apr 6, 2026
4f3d311
chore: remove useless config in flag manifesr.
roddhjav Apr 6, 2026
efcb3d6
Merge remote-tracking branch 'upstream/main'
skarpinis Apr 6, 2026
e7f0dd4
fix(profile): quick fix.
skarpinis Apr 6, 2026
d1bdc94
feat(abs): add sys/dmi-full, and use it in profiles.
roddhjav Apr 6, 2026
f2f046c
feat(abs): electron: improve crashpad_handler.
roddhjav Apr 6, 2026
4e2c99e
feat(profile): chromium: ix some xdg tool.
roddhjav Apr 6, 2026
0cc5190
feat(profile): firefox: cleanup proc access.
roddhjav Apr 6, 2026
d7d2723
fix(profile): let docker kill containers.
skarpinis Apr 7, 2026
94d1fac
feat(profile): various minor improvements.
roddhjav Apr 7, 2026
496191d
fix(profile): hostname: typo in attachments.
roddhjav Apr 8, 2026
5511bb2
feat(abs): update bluetooth abs
roddhjav Apr 8, 2026
45c872d
feat(abs): update dev abs
roddhjav Apr 8, 2026
96302b5
Merge branch 'roddhjav:main' into main
skarpinis Apr 10, 2026
7199d4a
feat(profile): few updates.
skarpinis Apr 10, 2026
cfe5501
fix(profile): removed whitespace.
skarpinis Apr 10, 2026
93c4c4e
fix(profile): further adjustments.
skarpinis Apr 10, 2026
9f3a299
feat(profile): trailing whitespace.
skarpinis Apr 10, 2026
5a3c010
feat(profile): corrected.
skarpinis Apr 10, 2026
564ac64
feat(abs): minor abstraction update.
roddhjav Apr 12, 2026
0ac69fb
feat(profile): minor profile update.
roddhjav Apr 12, 2026
bc935ab
feat(profile): add profile for docker.
roddhjav Apr 12, 2026
967a085
Merge branch 'roddhjav:main' into main
skarpinis Apr 13, 2026
73a6c5d
feat(abs): chromium: improve crashpad_handler.
roddhjav Apr 14, 2026
61f17eb
feat(profile): update xdg tool profiles.
roddhjav Apr 14, 2026
6a8bdb5
feat(abs): dbus: update ca.desrt.dconf.Writer
roddhjav Apr 14, 2026
7f84348
feat(profile): update some apt profiles.
roddhjav Apr 14, 2026
0601eee
feat(profile): update some gnome profiles.
roddhjav Apr 14, 2026
2e1e1ed
doc: add doc for the linter.
roddhjav Apr 15, 2026
c205675
fix(profile): compilation issue.
roddhjav Apr 15, 2026
0b5ee83
feat(profile): improve gnome profiles.
roddhjav Apr 18, 2026
5696f2f
feat(profile): improve some electron based profiles.
roddhjav Apr 18, 2026
4b467ee
feat(abs): improve sys/dmi.
roddhjav Apr 18, 2026
3e3c373
build: initial structure for the base / tools / and prebuilt packages.
roddhjav Apr 18, 2026
e8cb660
feat(abs): improve some abstractions.
roddhjav Apr 18, 2026
c880c1f
refractor(aa): move path related tool in paths.
roddhjav Apr 19, 2026
9e10744
feat(prebuild): remove deprecated server configuration task.
roddhjav Apr 19, 2026
eab7f50
chore(pkg): remove windows onlt paths function.
roddhjav Apr 19, 2026
00f425e
chore(pkg): use os instead of io/ioutil
roddhjav Apr 19, 2026
5427a23
feat(pkg): minor update to the paths lib.
roddhjav Apr 19, 2026
60819f4
tests(pkg): add unit tests to the paths lib.
roddhjav Apr 19, 2026
52cf464
feat(profile): update hostname.
roddhjav Apr 20, 2026
256272e
feat(abs): add desktop-base.
roddhjav Apr 20, 2026
7201d6c
feat(aa-mode): add inital version of aa-mode.
roddhjav Apr 20, 2026
87040cf
feat(aa): cleanup the wip aa tool.
roddhjav Apr 20, 2026
fbc9a84
fix(aa): support literal ? in variable
roddhjav Apr 21, 2026
63379ff
feat(abs): remove dbus abs from flatpak apps.
roddhjav Apr 25, 2026
ff0378c
feat(profile): minor profiles update.
roddhjav Apr 25, 2026
fdd28f8
fix(abstraction): Avoid conflicting exec rules.
mbelair-canonical Apr 24, 2026
a5e07f4
feat(abs): update flatpak apps.
roddhjav Apr 25, 2026
1c94852
fix(profile): apparmor does not support variable in mqueue.
roddhjav Apr 25, 2026
883fc52
feat(aa-mode): ensure unconfined profile is never modified.
roddhjav Apr 25, 2026
cca0449
build(arch): only the main package depends on apparmor.
roddhjav Apr 26, 2026
4b40557
build: remove old prebuild tasks, add new one.
roddhjav Apr 26, 2026
f32c460
fix(prebuild): ensure flags cannot be added to if statement.
roddhjav Apr 27, 2026
1513640
feat(aa): add IsUnconfined.
roddhjav Apr 27, 2026
5d4f764
chore: add go doc in all packages.
roddhjav Apr 27, 2026
39dcbb3
chore: update golangci-lint and gitignore.
roddhjav Apr 27, 2026
44e51b7
feat(aa): add ReloadProfiles and ReloadAppArmor.
roddhjav Apr 27, 2026
150a073
feat(aa): parser: use Scan in Parse.
roddhjav Apr 27, 2026
1675b2f
feat(aa): parser: ensure Scan can parse if conditions.
roddhjav Apr 27, 2026
e3c915e
chore(aa): minore linter improvement.
roddhjav Apr 27, 2026
5082ce5
chore: update minimum go version to 1.24.
roddhjav Apr 27, 2026
831646b
chore(aa): add missing package comment.
roddhjav Apr 27, 2026
f5c8d58
feat(profile): minor profile improvements.
roddhjav Apr 28, 2026
84fd836
feat(profile): update some systemd-service profiles.
roddhjav Apr 28, 2026
5667cd2
feat(directive): dbus talk: allow send on direct peer_name.
roddhjav Apr 28, 2026
1ba4a06
feat(directive): dbus talk: show the directive after resolution.
roddhjav Apr 28, 2026
bf7cd4f
feat(directive): dbus: update tests and comments to last changes.
roddhjav Apr 28, 2026
271d08e
Update cups-notifier-dbus and ippfind flags
curiosityseeker Apr 30, 2026
2dd2959
Remove attach_disconnected for cups-notifier-dbus and ippfind
curiosityseeker May 1, 2026
e96dfe1
Add attach_disconnected to cups-notifier-dbus profile
curiosityseeker May 1, 2026
f8de8d2
Add attach_disconnected to ippfind profile
curiosityseeker May 1, 2026
9c5ead6
feat(tunable): initial definition for some common condition.
roddhjav May 1, 2026
3ee8d02
fix(aa-log): accept named pipes and write errors to stderr.
roddhjav May 2, 2026
8a2a9ac
fix(logs): update profile key handling to include namespace separatio…
roddhjav May 2, 2026
8c7031a
fix: add missing profileKey function.
roddhjav May 13, 2026
db8bcd5
build: update spec file.
roddhjav May 14, 2026
c274aa9
chore: add doc for aa-mode.
roddhjav May 14, 2026
285e3fe
feat(abs): small abs improvement.
roddhjav May 14, 2026
0c6f34b
feat(profile): small profile update.
roddhjav May 14, 2026
4e54c4b
ci(gitlab): update ubuntu to 26.04
roddhjav May 15, 2026
05ebb5c
feat(aa): dbus directive: remove trailing newlines in see action.
roddhjav May 15, 2026
a540c68
fix(debian): add hostname to the list of hidden profiles.
roddhjav May 15, 2026
41eea1a
feat(profile): minor profiles update
roddhjav May 15, 2026
ad93895
fix(linter): issue in too wide check.
roddhjav May 15, 2026
7d5155e
chore(aa): cosmetic.
roddhjav May 15, 2026
ac8b1d0
feat(abs): rewrite the game abstraction.
roddhjav May 15, 2026
5cde406
feat(abs): add the pressure vessel abstraction.
roddhjav May 15, 2026
bc26436
feat(profile): rewrite the umu game profile using pressure-vessel.
roddhjav May 15, 2026
fe16daf
feat(profile): update dracut-install.
roddhjav May 15, 2026
6854471
feat(profile): improve kde profiles.
roddhjav May 15, 2026
590cd9b
feat(profile): improve hyprland profiles.
roddhjav May 15, 2026
6fc5682
fix(profile): systemd-shutdown
roddhjav May 15, 2026
3e4c873
feat(tunable): add global steam paths.
roddhjav May 15, 2026
1821e23
fix: keep compatibility with aa 4.0
roddhjav May 15, 2026
a33ba30
Merge branch 'dev' into main2
roddhjav May 15, 2026
a55eb45
build: default opensure to aa5.
roddhjav May 15, 2026
bff209f
steamrt adjust
May 16, 2026
4df30fc
Merge branch 'main' of github.com:skarpinis/apparmor.d into skarpinis…
roddhjav May 20, 2026
71f0de5
Merge branch 'skarpinis-main' into main2
roddhjav May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .github/local/needrestart

This file was deleted.

43 changes: 19 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install linter dependencies
run: |
pipx install rust-just
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run basic profile linter check
run: |
make check
just check

build:
runs-on: ${{ matrix.os }}
Expand All @@ -21,10 +26,6 @@ jobs:
include:
- os: ubuntu-24.04
mode: default
- os: ubuntu-24.04
mode: full-system-policy
- os: ubuntu-22.04
mode: default
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -35,32 +36,23 @@ jobs:
sudo apt-get install -y \
devscripts debhelper config-package-dev \
auditd apparmor-profiles apparmor-utils
pipx install rust-just
echo "$HOME/.local/bin" >> $GITHUB_PATH
sudo rm /etc/apparmor.d/usr.lib.snapd.snap-confine.real

- name: Build the apparmor.d package
run: |
if [[ ${{ matrix.mode }} == full-system-policy ]]; then
echo -e "\noverride_dh_auto_build:\n\tmake full" >> debian/rules
fi
if [[ ${{ matrix.os }} == ubuntu-24.04 ]] && [[ ${{ matrix.mode }} == default ]]; then
# Test with Re-attach disconnected path
sed -e 's;// builder.Register("attach");builder.Register("attach");' -i pkg/prebuild/cli/cli.go
sed -e '/@{att}/d' -i apparmor.d/tunables/multiarch.d/system
fi
bash dists/build.sh dpkg
just build-dpkg

- name: Install apparmor.d
run: sudo dpkg --install .pkg/apparmor.d_*_amd64.deb || true

- name: Reload AppArmor
run: |
sudo systemctl restart apparmor.service || true
sudo systemctl status apparmor.service

- name: Ensure compatibility with some AppArmor userspace tools
if: matrix.os != 'ubuntu-24.04'
run: |
sudo aa-enforce /etc/apparmor.d/aa-notify
if ! sudo systemctl restart apparmor.service; then
sudo journalctl -xeu apparmor.service
exit 1
fi

- name: Show AppArmor log and rules
run: |
Expand All @@ -81,6 +73,7 @@ jobs:
tests:
runs-on: ubuntu-24.04
needs: build
if: github.ref_name == 'dev' || github.event_name == 'workflow_dispatch'
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -100,7 +93,8 @@ jobs:
sudo apt-get install -y \
apparmor-profiles apparmor-utils \
bats bats-support
sudo install -Dm0644 .github/local/needrestart /etc/apparmor.d/local/needrestart
pipx install rust-just
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install apparmor.d
run: |
Expand Down Expand Up @@ -132,11 +126,12 @@ jobs:

- name: Install integration dependencies
run: |
bash tests/requirements.sh
just init
find /usr/sbin/ -type f

- name: Run the integration tests
run: |
make integration
just integration

- name: Show final AppArmor logs
if: always()
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Build
.build
.logs
.pkg
.tree
.snapd
/snap
snapd.backup
tests/tldr
tests/tldr.tar.gz
tests/bats_dirty

# mkdocs
__pycache__
.cache
public
site
Expand All @@ -13,11 +20,12 @@ site
*.deb
*.buildinfo
*.changes
debian/hardened
debian/.debhelper
debian/*.debhelper

# Debian build packages
debian/apparmor.d.*/
debian/apparmor.d-*/
debian/apparmor.d.displace
debian/apparmor.d.substvars
debian/apparmor.d/
Expand Down
58 changes: 28 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---

include:
- template: Security/SAST.gitlab-ci.yml

variables:
PKGNAME: apparmor.d
PKGDEST: $CI_PROJECT_DIR/.pkg
PACKAGER: 'Alexandre Pujol <alexandre@pujol.io>'

Expand All @@ -23,8 +21,9 @@ bash:
image: koalaman/shellcheck-alpine
script:
- shellcheck --shell=bash
PKGBUILD dists/build.sh dists/docker.sh tests/check.sh
tests/packer/init.sh tests/packer/src/aa-update tests/packer/clean.sh
PKGBUILD dists/*.sh tests/check.sh
tests/packer/*.sh tests/packer/src/aa-update
tests/autopkgtest/autopkgtest.sh debian/common.postinst debian/common.postrm

golangci-lint:
stage: lint
Expand All @@ -38,12 +37,8 @@ packer:
name: hashicorp/packer:latest
entrypoint: [""]
script:
- cd tests &&
packer fmt --check packer/ &&
packer validate --syntax-only packer/

sast:
stage: lint
- packer fmt tests/packer/
- packer validate --syntax-only tests/packer/


# Code test
Expand All @@ -62,11 +57,13 @@ tests:
- go test $(go list ./pkg/... | grep -v /pkg/paths) -v -cover -coverprofile=coverage.out
- go tool cover -func=coverage.out

check:
# Disabled as it is long and we reach the limit of GitLab CI minutes
# Enabled in Github Actions CI
.check:
stage: test
image: registry.gitlab.com/roddhjav/builders/archlinux
script:
- make check
- just check

# Package Build
# -------------
Expand All @@ -84,29 +81,28 @@ archlinux:

debian:
stage: build
image: registry.gitlab.com/roddhjav/builders/debian:12
image: registry.gitlab.com/roddhjav/builders/debian:13
script:
- sudo chown -R build:build /builds/
- git config --global --add safe.directory $CI_PROJECT_DIR
- mkdir -p "$PKGDEST"
- sudo apt-get update -q && sudo apt-get install -y config-package-dev lsb-release
- sudo apt-get install -y -t bookworm-backports golang-go
- bash dists/build.sh dpkg
- sudo apt-get update -q && sudo apt-get install -y config-package-dev golang-go lsb-release libdistro-info-perl
- just build-dpkg
artifacts:
expire_in: 1 day
paths:
- $PKGDEST/*.deb

ubuntu:
stage: build
image: registry.gitlab.com/roddhjav/builders/ubuntu:24.04
image: registry.gitlab.com/roddhjav/builders/ubuntu:26.04
variables:
GOFLAGS: "-buildvcs=false"
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- mkdir -p "$PKGDEST"
- sudo apt-get update -q && sudo apt-get install -y config-package-dev golang-go lsb-release
- bash dists/build.sh dpkg
- sudo apt-get update -q && sudo apt-get install -y config-package-dev golang-go lsb-release libdistro-info-perl
- just build-dpkg
artifacts:
expire_in: 1 day
paths:
Expand All @@ -117,15 +113,15 @@ whonix:
variables:
DISTRIBUTION: whonix
before_script:
- echo "\noverride_dh_auto_build:\n\tmake full" >> debian/rules
- sed -e "s/just complain/just fsp-complain/" -i debian/rules

opensuse:
stage: build
image: registry.gitlab.com/roddhjav/builders/opensuse
script:
- mkdir -p "$PKGDEST"
- sudo zypper install -y distribution-release golang-packaging apparmor-profiles
- bash dists/build.sh rpm
- just build-rpm
artifacts:
expire_in: 1 day
paths:
Expand All @@ -142,32 +138,32 @@ preprocess-archlinux:
- archlinux
script:
- pacman -Syu --noconfirm --noprogressbar apparmor
- pacman -U --noconfirm --noprogressbar $PKGDEST/*
- pacman -U --noconfirm --noprogressbar $PKGDEST/${PKGNAME}-*
- apparmor_parser --preprocess /etc/apparmor.d 1> /dev/null

preprocess-debian:
stage: preprocess
image: debian
image: debian:13
dependencies:
- debian
script:
- apt-get update -q
- apt-get install -y apparmor apparmor-profiles
- dpkg --install $PKGDEST/*
- dpkg --install $PKGDEST/${PKGNAME}_*
- apparmor_parser --preprocess /etc/apparmor.d 1> /dev/null

preprocess-ubuntu:
stage: preprocess
image: ubuntu
image: ubuntu:26.04
dependencies:
- ubuntu
script:
- apt-get update -q
- apt-get install -y apparmor apparmor-profiles
- dpkg --install $PKGDEST/*
- dpkg --install $PKGDEST/${PKGNAME}_*
- apparmor_parser --preprocess /etc/apparmor.d 1> /dev/null

preprocess-whonix:
.preprocess-whonix:
extends: preprocess-debian
dependencies:
- whonix
Expand All @@ -183,7 +179,7 @@ preprocess-opensuse:
- apparmor_parser --preprocess /etc/apparmor.d 1> /dev/null


# Deploy the documentation
# Deploy the documentation
# ------------------------

pages:
Expand All @@ -195,7 +191,9 @@ pages:
GIT_DEPTH: 0
script:
- pip install -r requirements.txt
- mkdocs build --site-dir public
- bash dists/docstring.sh
- zensical build --strict
- mv site public
artifacts:
paths:
- public
Expand Down
22 changes: 17 additions & 5 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
---

version: "2"

linters:
settings:
errcheck:
exclude-functions:
- (*os.File).Close
- (*os.File).WriteString
- (*os.Process).Kill
- (*github.com/roddhjav/apparmor.d/pkg/paths.Process).Kill
- (*bufio.Writer).Flush
- (*bufio.Writer).WriteString
- (*github.com/roddhjav/apparmor.d/pkg/paths.Path).Chmod
- (*github.com/roddhjav/apparmor.d/pkg/paths.Path).Remove
- (*github.com/roddhjav/apparmor.d/pkg/paths.Path).RemoveAll
- (*github.com/roddhjav/apparmor.d/cmd/aa-flatpak.FileWatcher).Close
- os.Remove
- path/filepath.WalkDir
staticcheck:
checks:
- all
- -SA1019
- -ST1000
exclusions:
paths:
- pkg/paths
paths:
- internal/
- tests/cmd/

Loading