cloudflare-leaky-paths
/cloudflare-leaky-paths
Generuje i stosuje regułę WAF Cloudflare blokującą na brzegu typowe ścieżki skanerów, zanim żądania dotrą do serwera źródłowego.
- Autor
- seangeng ↗
- Repozytorium
- skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 15.06.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 3
Brak sygnałów. Repozytorium zmienione 15.06.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Generuje i stosuje regułę WAF Cloudflare blokującą na brzegu typowe ścieżki skanerów, zanim żądania dotrą do serwera źródłowego.
Wyzwalacze z opisu
Oryginalny opis (EN)
Generate and apply a Cloudflare WAF custom rule that blocks common scanner/leaky paths (.env, .git, wp-login, phpMyAdmin, backups, infra config) at the edge before they reach the origin. Use when the user wants to block scanner traffic, harden a Cloudflare zone, stop .env/.git probing, reduce bot/scanner load, or asks about "leaky paths" or WAF custom rules.
Jak działa
- When to use
- The rule
- How to apply
- Verify
- Notes
Podgląd SKILL.md
---
name: cloudflare-leaky-paths
description: Generate and apply a Cloudflare WAF custom rule that blocks common scanner/leaky paths (.env, .git, wp-login, phpMyAdmin, backups, infra config) at the edge before they reach the origin. Use when the user wants to block scanner traffic, harden a Cloudflare zone, stop .env/.git probing, reduce bot/scanner load, or asks about "leaky paths" or WAF custom rules.
---
# Cloudflare leaky-paths WAF rule
Block high-signal scanner paths at Cloudflare's edge so they never hit the
origin. Cuts log noise, origin load, and the risk of an exposed secret being
fetched. Inspired by the `leaky-paths` wordlist (github.com/ayoubfathi/leaky-paths).
## When to use
- "Block scanners / bots at the edge"
- "Stop .env / .git probing"
- "Harden my Cloudflare zone / add a WAF rule"
- "These scanner hits are spamming my logs"
## The rule
Build a single Cloudflare custom-rule **expression** by OR-ing the path groups
the user wants. Each clause is `(http.request.uri.path contains "<path>")`.
### Path groups
**Dotfiles & secrets**
`/.env` `/.git` `/.svn` `/.aws` `/.ssh` `/.config` `/.DS_Store` `/.htaccess` `/.htpasswd`
**WordPress**
`/wp-login` `/wp-admin` `/wp-includes` `/wp-content` `/xmlrpc`
**Admin & DB tools**
`/phpmyadmin` `/adminer` `/server-status` `/server-info`
**Backups & dumps**
`/backup` `/backup.zip` `/dump.sql` `/db.sql` `/database.sql`
**Infra & CI config**
`/docker-compose.yml` `/.dockerenv` `/.terraform` `/.github` `/.vscode` `/.idea`
> Only include WordPress / admin groups if the site actually has none of those —
> otherwise you may block legitimate `/wp-admin` logins. Confirm the stack first.
### Example expression
```
(http.request.uri.path contains "/.env")
or (http.request.uri.path contains "/.git")
or (http.request.uri.path contains "/.aws")
or (http.request.uri.path contains "/wp-login")
or (http.request.uri.path contains "/phpmyadmin")
or (http.request.uri.path contains "/xmlrpc")
```
## How to apply
### Option A — Dashboard (fastest)
1. Cloudflare dashboard → your zone → **Security → WAF → Custom rules**.
2. **Create rule**, name it `block-leaky-paths`.
3. Switch the expression editor to **Edit expression** and paste the expression.
4. Action: **Block**. Deploy.
### Option B — API
```bash
curl -X POST \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/firewall/rules" \
-H "Authorization: Bearer $CF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '[{
"filter": { "expression": "<EXPRESSION>" },
"action": "block",
"description": "block-leaky-paths"
}]'
```
### Option C — Terraform
```hcl
resource "cloudflare_ruleset" "block_leaky_paths" {
zone_id = var.zone_id
name = "block-leaky-paths"
kind = "zone"
phase = "http_request_firewall_custom"
rules {
action = "block"
expression = "<EXPRESSION>"
description = "Block scanner/leaky paths at the edge"
enabled = true
}
}
```
## Verify
```bash
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/.env # expect 403
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/ # expect 200
```
## Notes
- Prefer **Block** over Managed Challenge for these — there's no legitimate
reason to request `/.env`.
- `contains` matches anywhere in the path, so `/foo/.git/config` is caught too.
- Keep the list lean; chasing every CVE path is a losing game. These are the
high-signal "quick win" endpoints scanners hit first.
Credit: trick popularized by @vikingmute; paths distilled from
`ayoubfathi/leaky-paths`.
Wersje
W bazie nie ma innych skilli o nazwie cloudflare-leaky-paths.
Migawka bazy z 28.10.2026 · wersja paczki 4acbb4eb0da8 (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100cloudflare-block-countries
Blokuje wybrane kraje regułami niestandardowymi WAF Cloudflare przez API, tworząc nowe zestawy reguł lub aktualizując istniejące. - 100cloudflare-block-countries
Blokuje wybrane kraje regułami niestandardowymi WAF Cloudflare przez API, tworząc nowe zestawy reguł lub aktualizując istniejące. - 100cloudflare-hygiene
Audytuje, utwardza i optymalizuje strefy Cloudflare: SSL/TLS, HSTS, cache, WAF, DNS, SPF, DKIM, DMARC i DNSSEC, a zmiany stosuje przez Cloudflare MCP po potwierdzeniu. - 100waf-rule-creator
Prawdopodobnie tworzy reguły WAF w obszarze bezpieczeństwa, na podstawie samej nazwy skilla. - 100cloudflare-expert
Dostarcza wiedzę o Cloudflare Workers, CDN, edge computingu i usługach bezpieczeństwa, takich jak WAF. - 100rate-limiting-strategy
Pomaga zaprojektować limity żądań dla API: wybór między token bucket, oknem przesuwnym, leaky bucket i oknem stałym, wdrożenie w Redis, limity na użytkownika, IP i endpoint oraz odpowiedź 429 z Retry-After.