Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the eBPF based AppArmor recorder into the API #2296

Merged
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a3f1b00
Integrate the eBPF based apparmor recorder into the API
ccojocar Jun 9, 2024
caa1b8f
Fix some lint warnings
ccojocar Jun 9, 2024
4d060ad
Fix more lint warnings
ccojocar Jun 9, 2024
d9964c8
Fix even more lint warnings
ccojocar Jun 9, 2024
40ba469
Fix implicit memory aliasing warning
ccojocar Jun 9, 2024
1705742
Fix formatting
ccojocar Jun 9, 2024
4603c6b
Remove unecessary blank line
ccojocar Jun 9, 2024
da87658
Fixing the formatting to make linters happy
ccojocar Jun 9, 2024
620c35d
Fix the profile recorder after refactoring to get the existing unit t…
ccojocar Jun 9, 2024
5667551
Update the recording webhook to set the security context also for app…
ccojocar Jun 9, 2024
0bcdf41
Add a unit test to admission webhook recording to check if apparmor e…
ccojocar Jun 9, 2024
567d559
Delete unused function to make linter happy
ccojocar Jun 9, 2024
52dcda2
Add some unit test in bpfrecorder to cover the apparmor recorder
ccojocar Jun 9, 2024
abc111b
Add unit tests in profilerecorder to cover the apparmor eBPF recorder
ccojocar Jun 9, 2024
c569511
Fix lint warnings by allowing duplicated code in tests
ccojocar Jun 9, 2024
6c57243
Fix formatting
ccojocar Jun 9, 2024
af23002
Add some documentation which describes how to record a apparmor profile
ccojocar Jun 9, 2024
9a7272a
Remove not used nonlint directive
ccojocar Jun 9, 2024
09c9438
Fix typos
ccojocar Jun 9, 2024
570bd25
Fix the bpfrecoder unit test
ccojocar Jun 9, 2024
ba4f714
Update comment to be more clear
ccojocar Jun 15, 2024
e0ee07f
Cleanup commented code
ccojocar Jun 15, 2024
3d6631b
Fix some lint warnings
ccojocar Jun 16, 2024
e89ccb7
Fix formatting
ccojocar Jun 16, 2024
3d80c99
Fix unit tests after refactoring
ccojocar Jun 16, 2024
01f8a52
Enable the BPF LSM during unit testing
ccojocar Jun 16, 2024
6a4197c
Make sure the E2E_TEST_BPF_LSM_ENABLED env variable is set for all bp…
ccojocar Jun 17, 2024
8570c78
Set the env variable in each prepare function
ccojocar Jun 17, 2024
c1f319c
Wrap the bpfrecorder unit tests into a Run in order to set the env va…
ccojocar Jun 17, 2024
ea95d47
Fix lint warnings
ccojocar Jun 17, 2024
3da8ba8
Fix more lint warnings
ccojocar Jun 17, 2024
694bc1e
Avoid running the bpfrecorder test in parallel
ccojocar Jun 17, 2024
af72a87
Remove unused nolint directive
ccojocar Jun 17, 2024
a354478
Fix the spoc e2e tests when the proc is started externally
ccojocar Jun 23, 2024
f3e98d4
Fix some lint warnings
ccojocar Jun 23, 2024
6b2958e
Fix even more lint warnings
ccojocar Jun 23, 2024
d022451
Reduce file permissions
ccojocar Jun 23, 2024
d1e3267
Fix compilation error
ccojocar Jun 23, 2024
71aebad
Increase the sleep time of target command in spoc e2e no-proc
ccojocar Jun 23, 2024
32e6bb9
Fix typo
ccojocar Jun 23, 2024
1666e86
Include extra ssh config to vagrant files if present
ccojocar Jun 30, 2024
b68834e
Do not fail the bpfrecorder if the BPF program cannot load
ccojocar Jun 30, 2024
69670fe
Run the bpfrecorder apparmor test in parallel
ccojocar Jun 30, 2024
898ae03
Skip the spoc e2e tests if apparmor or BPF_LSM is disabled
ccojocar Jun 30, 2024
211b175
Run the spoc e2e test in Debian 12 image which supports BPF LSM
ccojocar Jun 30, 2024
704076a
Fix typo
ccojocar Jun 30, 2024
5d76008
Add an option to disable the image build for Debian
ccojocar Jun 30, 2024
9de138c
Use the profilerecording name when disabeling a recorded profile
ccojocar Jun 30, 2024
21946d2
Fix typo in variable name
ccojocar Jun 30, 2024
0f49aa7
Update the instalaltion and usage doc for eBPF base recording
ccojocar Jul 1, 2024
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
Prev Previous commit
Next Next commit
Fix compilation error
Change-Id: Id3a37643fbd22f5b126234c3c765d4c89783a69d
Signed-off-by: Cosmin Cojocar <[email protected]>
  • Loading branch information
ccojocar committed Jun 29, 2024
commit d1e32676601f40d61f2cc6e449f18464f6c8fc90
2 changes: 1 addition & 1 deletion internal/pkg/util/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func createProcData(root string, pid int, cmd string, skipCmd, emptyCmd bool) er
}
if !skipCmd {
cmdFile := path.Join(procDir, "cmdline")
if err := os.WriteFile(cmdFile, []byte(cmd), 0o600; err != nil {
if err := os.WriteFile(cmdFile, []byte(cmd), 0o600); err != nil {
return fmt.Errorf("creating cmd file: %w", err)
}
}
Expand Down