Skip to content

SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/implementing-ddos-mitigation-with-cloudflare

implementing-ddos-mitigation-with-cloudflare

Verified

Configure Cloudflare DDoS protection with managed rulesets, rate limiting, WAF rules, Bot Management, and origin protection to mitigate volumetric, protocol, and application-layer attacks.

FileKindSize
LICENSEother11.0 KB
SKILL.mdskill md14.7 KB
references/api-reference.mdmarkdown1.6 KB
scripts/agent.pyscript4.6 KB

references/api-reference.md

View on GitHub
# API Reference: Cloudflare DDoS Mitigation Agent

## Dependencies

| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | HTTP client for Cloudflare API v4 |

## CLI Usage

```bash
python scripts/agent.py \
  --api-token CF_API_TOKEN \
  --output-dir /reports/
```

## Functions

### `CloudflareClient(api_token)`
Authenticated client using Bearer token for Cloudflare API v4.

### `list_zones() -> list`
GET `/zones` - List all managed zones.

### `get_zone_analytics(zone_id, since) -> dict`
GET `/zones/{id}/analytics/dashboard` - Traffic analytics for time period.

### `get_firewall_events(zone_id, limit) -> list`
GET `/zones/{id}/security/events` - Recent firewall/WAF events.

### `get_ddos_settings(zone_id) -> dict`
GET `/zones/{id}/firewall/ddos_protection` - DDoS protection configuration.

### `create_rate_limit_rule(zone_id, url_pattern, threshold, period) -> dict`
POST `/zones/{id}/rate_limits` - Create rate limiting rule.

### `set_security_level(zone_id, level) -> dict`
PATCH `/zones/{id}/settings/security_level` - Set security level (low/medium/high/under_attack).

## Cloudflare API Endpoints

| Endpoint | Method | Purpose |
|----------|--------|---------|
| `/zones` | GET | Zone listing |
| `/zones/{id}/analytics/dashboard` | GET | Traffic data |
| `/zones/{id}/security/events` | GET | Security events |
| `/zones/{id}/rate_limits` | POST | Rate limiting |

## Output Schema

```json
{
  "summary": {"zones_assessed": 3, "total_threats": 15420},
  "zones": [{"name": "example.com", "traffic": {"threats_blocked": 5140}}]
}
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall