Skip to content

docs: clarify filter matching behavior and point injection blocking to Shield - #850

Merged
davidmytton merged 2 commits into
mainfrom
docs/filter-matching-behavior
Jul 23, 2026
Merged

docs: clarify filter matching behavior and point injection blocking to Shield#850
davidmytton merged 2 commits into
mainfrom
docs/filter-matching-behavior

Conversation

@davidmytton

Copy link
Copy Markdown
Collaborator

Summary

Adds a Matching behavior section to the Filters reference documenting how filter expressions match request fields, addressing arcjet/arcjet#8614.

  • Explains that string comparisons (eq, ne, contains) are literal, case-sensitive byte matches with no normalization, and how to match case-insensitively via lower()/upper() or matches with a (?i) regex flag.
  • Documents that http.request.uri.args values are percent-decoded before matching, while http.request.uri.path is matched raw/still-encoded.
  • Adds guidance that hand-written filters are not an effective way to block injection-style attacks (SQLi/XSS) since matching is literal, and directs users to Shield as the purpose-built WAF to use alongside filters.

Also updates the page ajToc and the regenerated reference screenshots.

Closes arcjet/arcjet#8614

🤖 Generated with Claude Code

Document that filter expressions match request fields literally and
case-sensitively with no normalization, note that query args are
percent-decoded while paths are not, and steer injection-style blocking
(SQLi/XSS) toward Shield rather than hand-written filters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arcjet-docs Ready Ready Preview, Comment Jul 23, 2026 11:18pm

Request Review

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🟢 Low Risk

Decision: Approved

Rationale: This is a documentation-only change clarifying filter matching semantics and directing users toward Shield for injection-style attack detection. No escalation triggers fired, no secrets or executable logic were introduced, and the security guidance generally reduces risk by discouraging brittle hand-written injection filters.

Summary of Changes

Adds a new 'Matching behavior' section to the filters reference explaining literal, case-sensitive matching, decoded versus raw fields, and why Arcjet Shield should be used for SQLi/XSS-style attack detection instead of custom filters.

Review: c1c14817 | Model: openai/gpt-5.5 | Powered by Arcjet Review

Comment thread src/content/docs/filters/reference.mdx
Address review feedback: avoid implying Shield catches every obfuscation
variant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@davidmytton
davidmytton enabled auto-merge July 23, 2026 23:19
@davidmytton
davidmytton added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 43619ec Jul 23, 2026
11 checks passed
@davidmytton
davidmytton deleted the docs/filter-matching-behavior branch July 23, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant