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

xss_match_statement for and_statement #124

Open
gustavo-guerra-compasso opened this issue Oct 6, 2023 · 0 comments
Open

xss_match_statement for and_statement #124

gustavo-guerra-compasso opened this issue Oct 6, 2023 · 0 comments

Comments

@gustavo-guerra-compasso
Copy link

What is the current behavior?
the module does not work with rule xss_match_statement inside and_statement.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

this the terraform code I am using:
default = [
{
name = "allow-svg-upload-modalities"
priority = "0"

  action = "allow"

  and_statement = {
    statements = [
      {
        geo_match_statement = {
          country_codes = ["NL", "GB", "US"]
        }
      },
      {
        xss_match_statement = {
          field_to_match = {
            body = {
              oversize_handling = "MATCH"
            }
          }
          priority = 0
          type     = "NONE"
        }
      },
      {
        regex_match_statement = {
          regex_string = "\\/path\\/(.*)\\/settings"
          field_to_match = {
            uri_path = "{}"
          }
          priority = 0
          type     = "NONE"
        }
      }
    ]
  }

  visibility_config = {
    cloudwatch_metrics_enabled = false
    metric_name                = "allow-svg-upload-modalities"
    sampled_requests_enabled   = true
  }
}

]

What is the expected behavior?
Be able to create xss_match_statement rules for and_statements.

Software versions?
4.6.1 but it seem that the current version (5.1.2) has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant