Add rack middleware for remote IP collection for AI Guard#5677
Conversation
Typing analysisNote: Ignored files are excluded from the next sections.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3199f3375c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BenchmarksBenchmark execution time: 2026-05-07 15:51:31 Comparing candidate commit 4cf1f33 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 4cf1f33 | Docs | Datadog PR Page | Give us feedback! |
Strech
left a comment
There was a problem hiding this comment.
I think we can slightly improve some typing parts and I have a question over the middlewares order
|
(I cannot post a comment in the |
vpellan
left a comment
There was a problem hiding this comment.
LGTM for the shared parts
d06cd66 to
4cf1f33
Compare
What does this PR do?
This PR adds collection of
http.client_ipandnetwork.client.iptags to AI Guard via Rack middleware. This middleware is automatically added in Rails when AI Guard is enabled, similar to AppSec.We want to always collect client IP addresses when AI Guard is used.
Change log entry
Yes. AI Guard: ensure that client IP is always collected when AI Guard is enabled.
Additional Notes:
APPSEC-62200
How to test the change?
CI and manual testing with
appsec-app-generator.