Skip to content

Commit

Permalink
-_-
Browse files Browse the repository at this point in the history
  • Loading branch information
mftoure committed Mar 6, 2025
1 parent 5a20444 commit b6cf02c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/security/rules/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,7 @@ func (e *RuleEngine) notifyAPIServer(ruleIDs []rules.RuleID, policies []*monitor
func (e *RuleEngine) getCommonSECLVariables(rs *rules.RuleSet) map[string]*api.SECLVariableState {
var seclVariables = make(map[string]*api.SECLVariableState)
for name, value := range rs.GetVariables() {
var scope string
parts := strings.Split(name, ".")
if len(parts) > 0 {
scope = parts[0]
}
if scope == "process" {
if strings.HasPrefix(name, "process.") {
scopedVariable := value.(eval.ScopedVariable)
if !scopedVariable.IsMutable() {
continue
Expand All @@ -410,7 +405,7 @@ func (e *RuleEngine) getCommonSECLVariables(rs *rules.RuleSet) map[string]*api.S
Value: scopedValue,
}
})
} else if scope == "container" || scope == "cgroup" {
} else if strings.HasPrefix(name, "container.") || strings.HasPrefix(name, "cgroup.") {
continue
} else { // global variables
value, found := value.(eval.Variable).GetValue()
Expand Down

0 comments on commit b6cf02c

Please sign in to comment.