Skip to content

Commit

Permalink
Modified comments
Browse files Browse the repository at this point in the history
Signed-off-by: Afek Berger <[email protected]>
  • Loading branch information
afek854 committed Nov 20, 2024
1 parent 549e1a8 commit a7cb3c8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/eventreporters/rulepolicy/rule_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func NewRulePolicyReporter(ruleManager rulemanager.RuleManagerClient, applicatio
func (rpm *RulePolicyReporter) ReportEvent(eventType utils.EventType, event utils.K8sEvent, k8sContainerID string, allowedProcess string) {
rulesIds := rpm.ruleManager.EvaluateRulesForEvent(eventType, event)
for _, rule := range rulesIds {
// TODO: Add a check to see if the rule is using rule policy
rpm.applicationProfileManager.ReportRulePolicy(k8sContainerID, rule, allowedProcess, false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestR1010SymlinkCreatedOverSensitiveFile(t *testing.T) {
{
Name: "test",
PolicyByRuleId: map[string]v1beta1.RulePolicy{
R1010ID: v1beta1.RulePolicy{
R1010ID: {
AllowedProcesses: []string{"/usr/sbin/groupadd"},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruleengine/v1/r1011_ld_preload_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestR1011LdPreloadHook(t *testing.T) {
{
Name: "test",
PolicyByRuleId: map[string]v1beta1.RulePolicy{
R1011ID: v1beta1.RulePolicy{
R1011ID: {
AllowedProcesses: []string{"test"},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestR1012HardlinkCreatedOverSensitiveFile(t *testing.T) {
{
Name: "test",
PolicyByRuleId: map[string]v1beta1.RulePolicy{
R1012ID: v1beta1.RulePolicy{
R1012ID: {
AllowedProcesses: []string{"/usr/sbin/groupadd"},
},
},
Expand Down
1 change: 1 addition & 0 deletions tests/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ func Test_14_RulePoliciesTest(t *testing.T) {
t.Errorf("Error waiting for workload to be ready: %v", err)
}

// Wait for application profile to be ready
assert.NoError(t, endpointTraffic.WaitForApplicationProfile(80, "ready"))

// Add to rule policy symlink
Expand Down

0 comments on commit a7cb3c8

Please sign in to comment.