Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Nov 27, 2024
1 parent 0835dc7 commit b6c73a7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 82 deletions.
29 changes: 0 additions & 29 deletions pkg/acquisition/modules/appsec/appsec_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
tests := []appsecRuleTest{
{
name: "no rule : check return code",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -46,7 +45,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change return code",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -77,7 +75,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change action to a non standard one (log)",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -108,7 +105,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change action to another standard one (allow)",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -137,7 +133,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change action to another standard one (ban)",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -164,7 +159,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change action to another standard one (captcha)",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -191,7 +185,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: change action to a non standard one",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -220,7 +213,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: cancel alert",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -248,7 +240,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: cancel event",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -276,7 +267,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: on_success break",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -305,7 +295,6 @@ func TestAppsecOnMatchHooks(t *testing.T) {
},
{
name: "on_match: on_success continue",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -345,7 +334,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
tests := []appsecRuleTest{
{
name: "Basic pre_eval hook to disable inband rule",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -373,7 +361,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "Basic pre_eval fails to disable rule",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -408,7 +395,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : disable inband by tag",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -436,7 +422,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : disable inband by ID",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -464,7 +449,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : disable inband by name",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -492,7 +476,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : outofband default behavior",
expected_load_ok: true,
outofband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -523,7 +506,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : set remediation by tag",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand All @@ -550,7 +532,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : set remediation by name",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand All @@ -577,7 +558,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : set remediation by ID",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -606,7 +586,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : on_success continue",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -634,7 +613,6 @@ func TestAppsecPreEvalHooks(t *testing.T) {
},
{
name: "pre_eval : on_success break",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rulez",
Expand Down Expand Up @@ -674,7 +652,6 @@ func TestAppsecRemediationConfigHooks(t *testing.T) {
tests := []appsecRuleTest{
{
name: "Basic matching rule",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -699,7 +676,6 @@ func TestAppsecRemediationConfigHooks(t *testing.T) {
},
{
name: "SetRemediation",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -726,7 +702,6 @@ func TestAppsecRemediationConfigHooks(t *testing.T) {
},
{
name: "SetRemediation",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -763,7 +738,6 @@ func TestOnMatchRemediationHooks(t *testing.T) {
tests := []appsecRuleTest{
{
name: "set remediation to allow with on_match hook",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand All @@ -789,7 +763,6 @@ func TestOnMatchRemediationHooks(t *testing.T) {
},
{
name: "set remediation to captcha + custom user code with on_match hook",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -821,7 +794,6 @@ func TestOnMatchRemediationHooks(t *testing.T) {
},
{
name: "on_match: on_success break",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down Expand Up @@ -854,7 +826,6 @@ func TestOnMatchRemediationHooks(t *testing.T) {
},
{
name: "on_match: on_success continue",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down
2 changes: 0 additions & 2 deletions pkg/acquisition/modules/appsec/appsec_lnx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func TestAppsecRuleTransformsOthers(t *testing.T) {
tests := []appsecRuleTest{
{
name: "normalizepath",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -43,7 +42,6 @@ func TestAppsecRuleTransformsOthers(t *testing.T) {
},
{
name: "normalizepath #2",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down
11 changes: 0 additions & 11 deletions pkg/acquisition/modules/appsec/appsec_remediation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ func TestAppsecDefaultPassRemediation(t *testing.T) {
tests := []appsecRuleTest{
{
name: "Basic non-matching rule",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -41,7 +40,6 @@ func TestAppsecDefaultPassRemediation(t *testing.T) {
},
{
name: "DefaultPassAction: pass",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -67,7 +65,6 @@ func TestAppsecDefaultPassRemediation(t *testing.T) {
},
{
name: "DefaultPassAction: captcha",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -93,7 +90,6 @@ func TestAppsecDefaultPassRemediation(t *testing.T) {
},
{
name: "DefaultPassHTTPCode: 200",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -119,7 +115,6 @@ func TestAppsecDefaultPassRemediation(t *testing.T) {
},
{
name: "DefaultPassHTTPCode: 200",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand Down Expand Up @@ -155,7 +150,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
tests := []appsecRuleTest{
{
name: "Basic matching rule",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule1",
Expand All @@ -180,7 +174,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
},
{
name: "default remediation to ban (default)",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand All @@ -206,7 +199,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
},
{
name: "default remediation to allow",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand All @@ -232,7 +224,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
},
{
name: "default remediation to captcha",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand All @@ -258,7 +249,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
},
{
name: "custom user HTTP code",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand All @@ -284,7 +274,6 @@ func TestAppsecDefaultRemediation(t *testing.T) {
},
{
name: "custom remediation + HTTP code",
expected_load_ok: true,
inband_rules: []appsec_rule.CustomRule{
{
Name: "rule42",
Expand Down
Loading

0 comments on commit b6c73a7

Please sign in to comment.