Skip to content

Commit

Permalink
update(userspace/engine): remove warnings for missing exceptions
Browse files Browse the repository at this point in the history
We want users to continue using rules without having to use exceptions.
Exceptions are an additional feature for more advanced use-cases, having
a warning in there will mean that everyone now adds an empty exception
to avoid the warning.

Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>
  • Loading branch information
fntlnz and leogr committed Apr 7, 2021
1 parent 548ad42 commit 5fdc98a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions userspace/engine/lua/rule_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,8 @@ function load_rules_doc(rules_mgr, doc, load_state)
v['source'] = "syscall"
end

-- Add an empty exceptions property to the rule if not
-- defined, but add a warning about defining one
-- Add an empty exceptions property to the rule if not defined
if v['exceptions'] == nil then
warnings[#warnings + 1] = "Rule "..v['rule']..": consider adding an exceptions property to define supported exceptions fields"
v['exceptions'] = {}
end

Expand Down

0 comments on commit 5fdc98a

Please sign in to comment.