MEIER-352: Fix WAF case-sensitive bypass and switch Serilog to OTLP sink#85
Merged
andymeierdev merged 1 commit intomainfrom Mar 24, 2026
Conversation
🍹
|
d0b332e to
b3f9ed7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes to improve observability and security for andymeier.dev:
1. WAF case-sensitive bypass fix (
pulumi/src/cloudflare/waf.ts)Vulnerability scanners were using mixed-case paths (e.g.
/ReAcT/.EnV,/StAgInG/.EnV,/.eNv.sAvE.1) to bypass the Cloudflare WAF rules, which used case-sensitivecontainsmatching.Fix: Wrapped every expression in
lower()solower(http.request.uri.path) contains "/.env"catches all case variants. Also added a rule for.env.variants (.env.sample,.env.prod,.env.save.1) and deduplicated the phpMyAdmin entries.2. Switch Serilog to OTLP sink (
app/src/App/src/Program.fs,app/src/App/paket.references)Serilog log events sent to Seq via the Seq sink had no service identifier, making it impossible to distinguish logs from andymeier vs fsharpviewengine or other .NET apps. Meanwhile, OTLP traces already included
Resource.service.name = "andymeier".Fix: Replaced
Serilog.Sinks.SeqwithSerilog.Sinks.OpenTelemetry, which sends logs via OTLP withResource.service.name = "andymeier"— matching the standard already used by traces. Removed the unused Seq sink dependency.Tradeoff: The Seq sink supported
controlLevelSwitchfor remote log level adjustment from the Seq UI. The OTel sink does not — log level is now controlled only by theDEBUGenv var.Validation
./fake.sh Test)pulumi previewshows expected changes (WAF ruleset update + deployment update)Resource.service.name