Skip to content

Overly permissive regex pattern (matches every value) #49

Description

@jonasbb

Triggers when a matches regex on a plain field LHS is one of the always-match patterns (., ., .+, ^, $, ^.$, |, etc.). The rule effectively has no condition and fires on every request — almost always a typo or oversight.

For path fields (http.request.uri.path, raw.http.request.uri.path), additional patterns are flagged: /, ^/, /., ^/., etc. Paths always start with /, so these are also always-match in path context.

Check if these are all covered

https://github.com/doctena-org/octorules-cloudflare/blob/ac57450/docs/lint/stage2-per-rule.md#cf548--overly-permissive-regex-pattern-matches-every-value

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions