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

Chore at large #3979

Merged
merged 7 commits into from
Apr 24, 2024
Merged

Chore at large #3979

merged 7 commits into from
Apr 24, 2024

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented Apr 15, 2024

1. Explain what the PR does

c5f3f8d chore(policy): move logic into policies_compute.go
1397714 chore(cmd): reuse already computed policies value
1d17a50 chore(policy): align policy and polices API
3faa9b8 chore(policy): rename consts and add PolicyNone
78305a9 chore(policy): remove SetVersion()
e8f4545 chore(policy): remove useless code
ea3998e chore: remove dead/duplicate code

c5f3f8d chore(policy): move logic into policies_compute.go

This new file contains the logic for policies computation.

1397714 chore(cmd): reuse already computed policies value

GetContainerMode() can make use of the already computed policies
information (container filters) via ContainerFilterEnabled().

1d17a50 chore(policy): align policy and polices API

Both policy and policies now have the same ContainerFilterEnabled()
method returning a boolean value.

The respective bitmap now is accessed via Policies
WithContainerFilterEnabled().

78305a9 chore(policy): remove SetVersion()

The field can be set directly, so the method is not needed.

e8f4545 chore(policy): remove useless code

The values returned by the removed methods are only used for
computation, so it is unnecessary to expose them.

2. Explain how to test it

3. Other comments

The values returned by the removed methods are only used for
computation, so it is unnecessary to expose them.
The field can be set directly, so the method is not needed.
Both policy and policies now have the same ContainerFilterEnabled()
method returning a boolean value.

The respective bitmap now is accessed via Policies
WithContainerFilterEnabled().
GetContainerMode() can make use of the already computed policies
information (container filters) via ContainerFilterEnabled().
This new file contains the logic for policies computation.
pkg/ebpf/tracee.go Show resolved Hide resolved
pkg/policy/policies.go Show resolved Hide resolved
pkg/policy/policies.go Show resolved Hide resolved
Copy link
Contributor

@rscampos rscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geyslan geyslan merged commit e9769ac into aquasecurity:main Apr 24, 2024
33 checks passed
@geyslan geyslan deleted the chore-at-large branch June 28, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants