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

feat(waf): add new check waf_regional_rule_with_conditions #5411

Conversation

HugoPBrito
Copy link
Member

Context

AWS WAF Classic Regional rules allow users to define specific conditions for monitoring and controlling HTTP(S) requests in their region-based applications. A rule should include at least one condition, such as inspecting the origin, headers, or body of requests, to perform the intended action, like blocking or allowing traffic. Ensuring that WAF rules are not empty is vital for the security and functionality of these applications.

Description

This check verifies whether an AWS WAF Classic Regional rule contains at least one condition. The check fails if no conditions are present within the rule.

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HugoPBrito HugoPBrito requested review from a team as code owners October 15, 2024 07:21
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Oct 15, 2024
@HugoPBrito HugoPBrito added the no-merge Please, DO NOT MERGE this PR. label Oct 15, 2024
@HugoPBrito HugoPBrito removed the no-merge Please, DO NOT MERGE this PR. label Oct 15, 2024
Resolved comments and added total structure for WAFRegional
@HugoPBrito HugoPBrito changed the title feat(WAF): add new check waf_rule_has_conditions feat(WAF): add new check waf_regional_rule_with_conditions Oct 16, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.29%. Comparing base (9d97b1a) to head (e20097f).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5411      +/-   ##
==========================================
+ Coverage   89.22%   89.29%   +0.07%     
==========================================
  Files        1047     1048       +1     
  Lines       32423    32441      +18     
==========================================
+ Hits        28929    28969      +40     
+ Misses       3494     3472      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergargar sergargar self-requested a review October 16, 2024 15:54
@sergargar sergargar changed the title feat(WAF): add new check waf_regional_rule_with_conditions feat(waf): add new check waf_regional_rule_with_conditions Oct 16, 2024
@sergargar sergargar merged commit 3c0f360 into master Oct 16, 2024
11 checks passed
@sergargar sergargar deleted the PRWLR-4448-ensure-aws-waf-classic-regional-rules-have-at-least-one-condition branch October 16, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants