Add ctl:auditengine action support

This commit is contained in:
Martin Vierula
2022-01-19 14:06:01 -08:00
parent cb80837e6a
commit 2d51efae49
15 changed files with 4968 additions and 4759 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -64,6 +64,7 @@ class Driver;
#include "src/actions/block.h"
#include "src/actions/capture.h"
#include "src/actions/chain.h"
#include "src/actions/ctl/audit_engine.h"
#include "src/actions/ctl/audit_log_parts.h"
#include "src/actions/ctl/request_body_access.h"
#include "src/actions/ctl/rule_engine.h"
@@ -350,7 +351,7 @@ using namespace modsecurity::operators;
a = std::move(c);
#line 354 "seclang-parser.hh"
#line 355 "seclang-parser.hh"
# include <cassert>
# include <cstdlib> // std::abort
@@ -484,7 +485,7 @@ using namespace modsecurity::operators;
#endif
namespace yy {
#line 488 "seclang-parser.hh"
#line 489 "seclang-parser.hh"
@@ -8625,7 +8626,7 @@ switch (yykind)
}
} // yy
#line 8629 "seclang-parser.hh"
#line 8630 "seclang-parser.hh"

View File

@@ -25,6 +25,7 @@ class Driver;
#include "src/actions/block.h"
#include "src/actions/capture.h"
#include "src/actions/chain.h"
#include "src/actions/ctl/audit_engine.h"
#include "src/actions/ctl/audit_log_parts.h"
#include "src/actions/ctl/request_body_access.h"
#include "src/actions/ctl/rule_engine.h"
@@ -2625,18 +2626,17 @@ act:
}
| ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_ON
{
//ACTION_NOT_SUPPORTED("CtlAuditEngine", @0);
ACTION_CONTAINER($$, new actions::Action($1));
ACTION_CONTAINER($$, new actions::ctl::AuditEngine("ctl:auditengine=on"));
driver.m_auditLog->setCtlAuditEngineActive();
}
| ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_OFF
{
//ACTION_NOT_SUPPORTED("CtlAuditEngine", @0);
ACTION_CONTAINER($$, new actions::Action($1));
ACTION_CONTAINER($$, new actions::ctl::AuditEngine("ctl:auditengine=off"));
}
| ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_RELEVANT_ONLY
{
//ACTION_NOT_SUPPORTED("CtlAuditEngine", @0);
ACTION_CONTAINER($$, new actions::Action($1));
ACTION_CONTAINER($$, new actions::ctl::AuditEngine("ctl:auditengine=relevantonly"));
driver.m_auditLog->setCtlAuditEngineActive();
}
| ACTION_CTL_AUDIT_LOG_PARTS
{

File diff suppressed because it is too large Load Diff

View File

@@ -613,6 +613,7 @@ EQUALS_MINUS (?i:=\-)
{CONFIG_VALUE_DETC} { return p::make_CONFIG_VALUE_DETC(yytext, *driver.loc.back()); }
{CONFIG_VALUE_OFF} { return p::make_CONFIG_VALUE_OFF(yytext, *driver.loc.back()); }
{CONFIG_VALUE_ON} { return p::make_CONFIG_VALUE_ON(yytext, *driver.loc.back()); }
{CONFIG_VALUE_RELEVANT_ONLY} { return p::make_CONFIG_VALUE_RELEVANT_ONLY(yytext, *driver.loc.back()); }
[ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); }
[ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); }
}