Alexandre Pujol
228d3b653c
fix(aa): ineffective assignment
2024-06-23 10:57:46 +01:00
Alexandre Pujol
ff5ff965cd
test(aa): add merge unit tests.
2024-06-23 10:42:18 +01:00
Alexandre Pujol
6791dcde28
feat(aa): add merge methods to the rule interface.
2024-06-22 20:59:43 +01:00
Alexandre Pujol
42ca1be858
feat(aa): add the Merge method to the Rule interface.
2024-06-20 23:23:39 +01:00
Alexandre Pujol
d6424cb950
feat(aa): ensure comments are neither merged nor sorted.
2024-06-20 22:29:22 +01:00
Alexandre Pujol
fe983132cd
chore(aa): rename constructor function for consistency.
2024-06-20 16:34:49 +01:00
Alexandre Pujol
b0f6f15a9e
refractor: use internal Intersect function.
2024-06-19 23:55:45 +01:00
Alexandre Pujol
3b82cc36ba
feat(aa-log): only clean a few log keys, resolve more variables.
...
fix #382
2024-06-19 23:39:23 +01:00
Alexandre Pujol
7317c05646
feat(aa): update templates to last changes.
2024-06-19 23:31:22 +01:00
Alexandre Pujol
944f9575a0
feat(aa): rewrite rules formatting.
2024-06-19 23:30:36 +01:00
Alexandre Pujol
e91b0cc070
test(aa): add paragraph parser unit tests.
2024-06-19 23:26:19 +01:00
Alexandre Pujol
cd03640c10
feat(aa): update parse definition to last changes.
2024-06-19 23:24:43 +01:00
Alexandre Pujol
163c5be61c
feat(aa): add rule constructors from internal parser.
2024-06-19 23:22:49 +01:00
Alexandre Pujol
ac9d6d859f
feat(aa): add ParseRules: parse apparmor profile rules by paragraphs
2024-06-19 23:15:57 +01:00
Alexandre Pujol
cdab2588aa
refractor(aa): newRuleFromLog -> newBaseFromLog
2024-06-19 18:44:55 +01:00
Alexandre Pujol
afc0a7cd3b
test(aa): rule interface: update unit tests to last changes.
2024-06-19 18:39:16 +01:00
Alexandre Pujol
4cbacc186c
feat(aa): rule interface: replace less & equal by the compare method.
...
- set a new alphabet order to sort AARE based string.
- unify compare function for all rules
- handle some special sort order, eg: base include
2024-06-19 18:34:58 +01:00
Alexandre Pujol
a2c6580725
fix: profile compilation.
2024-06-15 22:28:37 +01:00
Alexandre Pujol
5999fc5d40
feat(aa): simplify unix log parsing.
2024-06-15 21:59:31 +01:00
Alexandre Pujol
117e63d88f
fix: ensure filter directive get cleaned on build.
2024-06-14 20:50:17 +01:00
Alexandre Pujol
6f5986a05e
feat(aa-log): improve rule generation on debian.
2024-06-11 00:08:17 +01:00
Alexandre Pujol
d98621625a
chore: small fixes and cosmetic.
2024-06-04 20:01:05 +01:00
Alexandre Pujol
41c0e57eca
build: better way to handle debian hide file.
...
only needed as whonix needs special addition.
2024-06-04 19:55:53 +01:00
Alexandre Pujol
34973baaea
build: use the same technique to disable upstream profile on all distribution.
...
Only enabled on Ubuntu & opensuse
2024-06-04 19:52:06 +01:00
Alexandre Pujol
16f30007e7
chore(aa): cosmetic.
2024-05-30 20:56:53 +01:00
Alexandre Pujol
4282fb336e
refractor(aa): move some test resource to the testdata dir.
2024-05-30 20:10:45 +01:00
Alexandre Pujol
89abbae6bd
Merge branch 'feat/aa'
...
Improve go apparmor lib.
* aa: (62 commits)
feat(aa): handle appending value to defined variables.
chore(aa): cosmetic.
fix: userspace prebuild test.
chore: cleanup unit test.
feat(aa): improve log conversion.
feat(aa): move conversion function to its own file & add unit tests.
fix: go linter issue & not defined variables.
tests(aa): improve aa unit tests.
tests(aa): improve rules unit tests.
feat(aa): ensure the prebuild jobs are working.
feat(aa): add more unit tests.
chore(aa): cleanup.
feat(aa): Move sort, merge and format methods to the rules interface.
feat(aa): add the hat template.
feat(aa): add the Kind struct to manage aa rules.
feat(aa): cleanup rules methods.
feat(aa): add function to resolve include preamble.
feat(aa): updaqte mount flags order.
feat(aa): update default tunable selection.
feat(aa): parse apparmor preamble files.
...
2024-05-30 19:29:34 +01:00
Alexandre Pujol
7f1de3626e
feat(aa): handle appending value to defined variables.
2024-05-30 14:23:56 +01:00
Alexandre Pujol
264f30cf12
chore(aa): cosmetic.
2024-05-30 14:19:56 +01:00
Alexandre Pujol
fd46c0de30
fix: userspace prebuild test.
2024-05-30 14:18:57 +01:00
Alexandre Pujol
cfd4786f76
chore: cleanup unit test.
2024-05-30 13:10:07 +01:00
Alexandre Pujol
7efa4b3a4b
feat(aa): improve log conversion.
2024-05-30 12:34:10 +01:00
Alexandre Pujol
992cab1fa4
feat(aa): move conversion function to its own file & add unit tests.
2024-05-30 12:32:30 +01:00
Alexandre Pujol
bc216176a3
fix: go linter issue & not defined variables.
2024-05-30 12:28:12 +01:00
Alexandre Pujol
0f382a4d5d
tests(aa): improve aa unit tests.
2024-05-29 21:18:30 +01:00
Alexandre Pujol
5f64bb4e0c
tests(aa): improve rules unit tests.
2024-05-29 21:17:21 +01:00
Alexandre Pujol
23eaa20fb7
feat(aa): ensure the prebuild jobs are working.
2024-05-29 21:12:54 +01:00
Alexandre Pujol
fe4c86a245
feat(aa): add more unit tests.
2024-05-28 18:23:37 +01:00
Alexandre Pujol
e33c1243cc
chore(aa): cleanup.
2024-05-28 18:22:14 +01:00
Alexandre Pujol
90087be509
feat(aa): Move sort, merge and format methods to the rules interface.
...
- Use the new Kind struct in favor of reflect
- Update sort function to slices.SortFunc
2024-05-28 18:20:52 +01:00
Alexandre Pujol
0761a6c466
feat(aa): add the hat template.
2024-05-28 18:16:21 +01:00
Alexandre Pujol
3b0944c615
feat(aa): add the Kind struct to manage aa rules.
2024-05-28 18:15:22 +01:00
Alexandre Pujol
1333ec2025
feat(aa): cleanup rules methods.
2024-05-28 18:07:32 +01:00
Alexandre Pujol
dc0e0084a0
feat(aa): add function to resolve include preamble.
2024-05-28 11:53:32 +01:00
Alexandre Pujol
04a91bbd9b
feat(aa): updaqte mount flags order.
2024-05-27 23:44:23 +01:00
Alexandre Pujol
0aa317d8e4
feat(aa): update default tunable selection.
2024-05-27 23:44:03 +01:00
Alexandre Pujol
a99387c323
feat(aa): parse apparmor preamble files.
2024-05-27 18:55:21 +01:00
Alexandre Pujol
2e043d4ec8
feat(aa): add some rules methods.
2024-05-26 18:05:15 +01:00
Alexandre Pujol
92641e7e28
feat(aa): add initial profile validation structure.
2024-05-25 22:36:39 +01:00
Alexandre Pujol
2dd6046697
feat(prebuild): add builder opt to build tasks.
2024-05-25 22:32:10 +01:00
Alexandre Pujol
02e3334949
feat(prebuild): add err reporting to builder & directive tasks.
2024-05-25 22:30:20 +01:00
Alexandre Pujol
865ce4c66b
chore: cosmetic
2024-05-25 22:26:51 +01:00
Alexandre Pujol
9812c38b83
test(aa): add unit tests for the link rule.
2024-05-25 22:22:57 +01:00
Alexandre Pujol
019b6f8197
feat(aa): format now merge access list.
2024-05-25 22:22:32 +01:00
Alexandre Pujol
54fdf38861
chore: cosmetic & fix.
2024-05-25 22:21:59 +01:00
Alexandre Pujol
72107dcfff
feat(aa): add the hat struct.
2024-05-25 22:17:32 +01:00
Alexandre Pujol
474481f1d3
test(aa): update unit tests.
2024-05-25 22:16:31 +01:00
Alexandre Pujol
656aa15836
feat(aa): rewrite the toAccess function to parse, convert and verify the access values.
2024-05-25 22:14:43 +01:00
Alexandre Pujol
05de39d92a
feat(aa): improve comment generation from log map.
2024-05-25 22:03:16 +01:00
Alexandre Pujol
744c745394
feat(aa): add requirements map.
2024-05-25 22:01:29 +01:00
Alexandre Pujol
e38f5b4637
feat(aa): add the link rule.
2024-05-25 21:56:28 +01:00
Alexandre Pujol
aa0386253c
test: remove useless unit test.
2024-05-11 13:25:24 +01:00
Alexandre Pujol
14cac43c6c
build: add @{int2} to the list of default variable.
2024-05-11 12:13:57 +01:00
Alexandre Pujol
81f0163086
feat(aa): cleanup, fix import and add some unit tests.
2024-05-05 14:19:25 +01:00
Alexandre Pujol
3ad55927bf
feat(aa): add basic rules getter
2024-05-05 14:11:00 +01:00
Alexandre Pujol
ad81c39e31
feat(aa): remove now unsused rule.Sort method.
2024-05-05 14:10:14 +01:00
Alexandre Pujol
305d06dbe0
feat(aa): rewrite variable handling.
2024-05-05 14:09:00 +01:00
Alexandre Pujol
28f4294774
feat(aa): move the all rule to its own file.
2024-05-05 13:57:15 +01:00
Alexandre Pujol
1e79d27232
feat(aa): rename identation variables.
2024-05-04 23:54:39 +01:00
Alexandre Pujol
5943e9a24d
test(aa): cleanup unit tests.
2024-05-04 23:45:36 +01:00
Alexandre Pujol
f763d31a07
feat(aa): a Constraint and Kind method to the Rule interface.
2024-05-04 23:41:47 +01:00
Alexandre Pujol
a5c4eab0cf
feat(aa): make preamble rule classic aa rules.
2024-05-04 23:25:55 +01:00
Alexandre Pujol
b636b4b3e9
feat(aa-log): improve the journalctl filter.
2024-05-03 13:01:10 +01:00
Alexandre Pujol
9c0f4dd6a7
fix(aa-log): grep journal logs over apparmor instead of AVC for wider compatibility.
2024-05-03 12:34:08 +01:00
Alexandre Pujol
511ba6c6a9
feat(aa-log): filter journactl log
2024-05-01 18:25:11 +01:00
Alexandre Pujol
af4ee0df00
fix(ci): build tests.
2024-04-28 17:50:07 +01:00
Alexandre Pujol
aa94ce1740
build: ensure KDE Neon is in the supported dist list.
...
See #312
2024-04-28 17:17:29 +01:00
Alexandre Pujol
c7fb47e97a
build: remove directive text not applied on build.
2024-04-28 14:22:00 +01:00
Alexandre Pujol
d1fb9574cb
feat(aa-log): speed up log generation.
2024-04-28 12:06:40 +01:00
Alexandre Pujol
926e146dad
chore: use internal paths lib.
2024-04-28 00:36:16 +01:00
Alexandre Pujol
f66789d381
chore: include build dep go-paths-helper.
...
See #305
2024-04-28 00:30:59 +01:00
Alexandre Pujol
0cd0262bed
chore: update go mod deps.
2024-04-28 00:04:42 +01:00
Alexandre Pujol
068373405f
feat(aa): add some missing rule template.
2024-04-25 14:01:04 +01:00
Alexandre Pujol
8a8808194b
refractor(aa): move base rule & qualifier to their own file.
2024-04-24 13:31:22 +01:00
Alexandre Pujol
8bb6f07950
feat(prebuilt): update aa usage to the last changes.
2024-04-23 21:43:22 +01:00
Alexandre Pujol
de73c9b706
test(aa): improve some internal unit test.
...
Thanks to the last changes...
2024-04-23 21:38:52 +01:00
Alexandre Pujol
a0b5362589
refractor(aa): update test structure.
2024-04-23 21:35:23 +01:00
Alexandre Pujol
2923df2a73
refractor(aa): move profile specific method to the profile struct.
2024-04-23 21:32:58 +01:00
Alexandre Pujol
120db93396
feat(aa): refractor apparmor templates to the last changes.
2024-04-23 21:27:35 +01:00
Alexandre Pujol
5483668574
feat(aa): add a string method to all rule struct.
2024-04-23 21:26:09 +01:00
Alexandre Pujol
e9fa0660f8
feat(aa): add define parameter for variables.
2024-04-23 21:18:44 +01:00
Alexandre Pujol
c719a0a109
feat(aa): ensure accesses are slice of string.
2024-04-23 21:17:25 +01:00
Alexandre Pujol
a2910122d2
fix: do not use the wrong profile.
2024-04-23 19:18:42 +01:00
Alexandre Pujol
c97886d960
feat(aa): continue refractoring the aa structure.
2024-04-19 22:43:02 +01:00
Alexandre Pujol
8ef858ad35
feat(aa): refractor template to allow multiple templates.
2024-04-17 18:02:41 +01:00
Alexandre Pujol
890275fb22
feat(aa): rename the main profile struct.
2024-04-16 21:51:56 +01:00
Alexandre Pujol
4b753210e7
feat(aa): modify the apparmor struct to support multiple profiles and subprofile.
2024-04-15 14:09:04 +01:00
Alexandre Pujol
507002c660
feat(aa): rename the main file template.
2024-04-15 13:32:20 +01:00
Alexandre Pujol
ab4feda5ba
feat(aa): improve apparmor struct.
2024-04-14 23:58:34 +01:00
Alexandre Pujol
ea1736083a
chore: use slices from standard library.
2024-04-12 20:07:05 +01:00