alegrey91 / harpoon

🔍 Trace syscalls from user-space functions, by using eBPF
Apache License 2.0
88 stars 3 forks source link

fix(build): add syscall validation before creating profile #35

Closed alegrey91 closed 2 months ago

alegrey91 commented 2 months ago

Fix #22 In this PR I've added a new function under the internal/seccomputils/ package to validate the syscalls before adding the to the seccomp profile. This is done because we could include even files not generated by harpoon, so to ensure all the syscalls we are going to add to the profile are valid, there's now a function that avoid putting garbage on that. Additionally I moved the old package internal/syscallwriter/ under internal/seccomputils/ since their scopes are quite similar.