Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-42916 added cs providers #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,30 @@ resource "traceable_notification_rule_actor_severity_change" "rule1" {
actor_severities = []
actor_ip_reputation_levels = ["HIGH"]

}

resource traceable_custom_signature_allow "csruletf"{
name="testtf2"
description="test1"
environments=["fintech-1","demo-test"]
custom_sec_rule=<<EOT
SecRule REQUEST_HEADERS:key-sec "@rx val-sec" \
"id:92100120,\
phase:2,\
block,\
msg:'Test sec Rule',\
logdata:'Matched Data: %%{TX.0} found within %%{MATCHED_VAR_NAME}: %%{MATCHED_VAR}',\
tag:'attack-protocol',\
tag:'traceable/labels/OWASP_2021:A4,CWE:444,OWASP_API_2019:API8',\
tag:'traceable/severity/HIGH',\
tag:'traceable/type/safe,block',\
severity:'CRITICAL',\
setvar:'tx.anomaly_score_pl1=+%%{tx.critical_anomaly_score}'"
EOT
req_res_conditions{
match_key="HEADER_NAME"
match_category="REQUEST"
match_operator="EQUALS"
match_value="req_header"
}
}
4 changes: 4 additions & 0 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func Provider() *schema.Provider {
// "traceable_api_exclusion_rule": resourceApiExclusionRule(),
"traceable_label_creation_rule": resourceLabelCreationRule(),
// "traceable_agent_token": resourceAgentToken(),
"traceable_custom_signature_allow": resourceCustomSignatureAllowRule(),
"traceable_custom_signature_block": resourceCustomSignatureBlockRule(),
"traceable_custom_signature_alert": resourceCustomSignatureAlertRule(),
"traceable_custom_signature_testing": resourceCustomSignatureTestingRule(),

},
DataSourcesMap: map[string]*schema.Resource{
Expand Down
Loading