[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q03SW86TW8FKF20B4D3DK1":3,"skill-same:01M6Q03SW86TW8FKF20B4D3DK1":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":34,"commitSha":56,"skillDirectory":57,"forksCount":13,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6Q03SW86TW8FKF20B4D3DK1","waf-setup",null,"Deploy and tune Web Application Firewalls. Configure rules for OWASP Top 10 protection. Use when protecting web applications from common attacks.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fwaf-setup\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"setup","waf setup","waf","top","security","attacks","relevant","scripts","scope","critical","active","main","community","only","common","configure","devops-security","owasp","assessment","owasp top 10","2026-11-10 10:12:30",false,"---\nname: waf-setup\ndescription: Deploy and tune Web Application Firewalls. Configure rules for OWASP\n  Top 10 protection. Use when protecting web applications from common attacks.\ncategory: security\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant security tooling (scanners, vault CLIs) and an\n  authorized scope for any active assessment. Docs-only; helper scripts and templates\n  not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# WAF Setup\n\nProtect web applications with Web Application Firewalls.\n\n## Prerequisites\n\n- Web application behind a load balancer or reverse proxy\n- AWS account for AWS WAF, or Cloudflare account for Cloudflare WAF\n- Nginx with ModSecurity module compiled for self-hosted WAF\n- Access to application logs to tune rules and identify false positives\n- Understanding of HTTP request\u002Fresponse structure\n\n## AWS WAF\n\n### Create Web ACL with Managed Rules\n\n```bash\n# Create Web ACL with AWS managed rules\naws wafv2 create-web-acl \\\n  --name production-waf \\\n  --scope REGIONAL \\\n  --default-action Allow={} \\\n  --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=production-waf \\\n  --rules file:\u002F\u002Fwaf-rules.json\n```\n\n### AWS WAF Rules Configuration\n\n```json\n[\n  {\n    \"Name\": \"AWSManagedRulesCommonRuleSet\",\n    \"Priority\": 1,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesCommonRuleSet\",\n        \"ExcludedRules\": []\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSCommonRules\"\n    }\n  },\n  {\n    \"Name\": \"AWSManagedRulesSQLiRuleSet\",\n    \"Priority\": 2,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesSQLiRuleSet\"\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSSQLiRules\"\n    }\n  },\n  {\n    \"Name\": \"AWSManagedRulesKnownBadInputsRuleSet\",\n    \"Priority\": 3,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesKnownBadInputsRuleSet\"\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSBadInputRules\"\n    }\n  },\n  {\n    \"Name\": \"RateLimitRule\",\n    \"Priority\": 4,\n    \"Statement\": {\n      \"RateBasedStatement\": {\n        \"Limit\": 2000,\n        \"AggregateKeyType\": \"IP\"\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"RateLimit\"\n    }\n  },\n  {\n    \"Name\": \"GeoBlockRule\",\n    \"Priority\": 5,\n    \"Statement\": {\n      \"GeoMatchStatement\": {\n        \"CountryCodes\": [\"KP\", \"IR\", \"SY\"]\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"GeoBlock\"\n    }\n  },\n  {\n    \"Name\": \"BlockBadUserAgents\",\n    \"Priority\": 6,\n    \"Statement\": {\n      \"ByteMatchStatement\": {\n        \"SearchString\": \"sqlmap\",\n        \"FieldToMatch\": { \"SingleHeader\": { \"Name\": \"user-agent\" } },\n        \"TextTransformations\": [{ \"Priority\": 0, \"Type\": \"LOWERCASE\" }],\n        \"PositionalConstraint\": \"CONTAINS\"\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"BadUserAgent\"\n    }\n  }\n]\n```\n\n### Associate WAF with ALB\n\n```bash\n# Associate with Application Load Balancer\naws wafv2 associate-web-acl \\\n  --web-acl-arn arn:aws:wafv2:us-east-1:123456789:regional\u002Fwebacl\u002Fproduction-waf\u002Fabc123 \\\n  --resource-arn arn:aws:elasticloadbalancing:us-east-1:123456789:loadbalancer\u002Fapp\u002Fmy-alb\u002Fabc123\n\n# Associate with API Gateway\naws wafv2 associate-web-acl \\\n  --web-acl-arn arn:aws:wafv2:us-east-1:123456789:regional\u002Fwebacl\u002Fproduction-waf\u002Fabc123 \\\n  --resource-arn arn:aws:apigateway:us-east-1::\u002Frestapis\u002Fabc123\u002Fstages\u002Fprod\n```\n\n### AWS WAF Terraform\n\n```hcl\nresource \"aws_wafv2_web_acl\" \"main\" {\n  name        = \"production-waf\"\n  scope       = \"REGIONAL\"\n  description = \"Production WAF with OWASP protections\"\n\n  default_action {\n    allow {}\n  }\n\n  rule {\n    name     = \"AWSManagedRulesCommonRuleSet\"\n    priority = 1\n\n    override_action { none {} }\n\n    statement {\n      managed_rule_group_statement {\n        name        = \"AWSManagedRulesCommonRuleSet\"\n        vendor_name = \"AWS\"\n\n        rule_action_override {\n          name = \"SizeRestrictions_BODY\"\n          action_to_use { count {} }\n        }\n      }\n    }\n\n    visibility_config {\n      cloudwatch_metrics_enabled = true\n      metric_name                = \"AWSCommonRules\"\n      sampled_requests_enabled   = true\n    }\n  }\n\n  rule {\n    name     = \"RateLimit\"\n    priority = 10\n\n    action { block {} }\n\n    statement {\n      rate_based_statement {\n        limit              = 2000\n        aggregate_key_type = \"IP\"\n      }\n    }\n\n    visibility_config {\n      cloudwatch_metrics_enabled = true\n      metric_name                = \"RateLimit\"\n      sampled_requests_enabled   = true\n    }\n  }\n\n  visibility_config {\n    cloudwatch_metrics_enabled = true\n    metric_name                = \"production-waf\"\n    sampled_requests_enabled   = true\n  }\n}\n\nresource \"aws_wafv2_web_acl_association\" \"alb\" {\n  resource_arn = aws_lb.main.arn\n  web_acl_arn  = aws_wafv2_web_acl.main.arn\n}\n```\n\n## Cloudflare WAF\n\n### API Configuration\n\n```bash\n# List available WAF rulesets\ncurl -s \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" | jq '.result[] | {id, name, phase}'\n\n# Create a custom WAF rule\ncurl -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Custom WAF Rules\",\n    \"kind\": \"zone\",\n    \"phase\": \"http_request_firewall_custom\",\n    \"rules\": [\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.uri.query contains \\\"union select\\\" or http.request.uri.query contains \\\"1=1\\\")\",\n        \"description\": \"Block SQL injection patterns in query string\"\n      },\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.uri.path contains \\\"..%2f\\\" or http.request.uri.path contains \\\"..%5c\\\")\",\n        \"description\": \"Block path traversal attempts\"\n      },\n      {\n        \"action\": \"challenge\",\n        \"expression\": \"(cf.threat_score gt 30)\",\n        \"description\": \"Challenge high threat score visitors\"\n      },\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.headers[\\\"user-agent\\\"] contains \\\"sqlmap\\\" or http.request.headers[\\\"user-agent\\\"] contains \\\"nikto\\\")\",\n        \"description\": \"Block known attack tools\"\n      }\n    ]\n  }'\n\n# Configure rate limiting\ncurl -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Rate Limiting\",\n    \"kind\": \"zone\",\n    \"phase\": \"http_ratelimit\",\n    \"rules\": [\n      {\n        \"action\": \"block\",\n        \"ratelimit\": {\n          \"characteristics\": [\"ip.src\"],\n          \"period\": 60,\n          \"requests_per_period\": 100,\n          \"mitigation_timeout\": 600\n        },\n        \"expression\": \"(http.request.uri.path matches \\\"^\u002Fapi\u002F\\\")\",\n        \"description\": \"Rate limit API endpoints\"\n      }\n    ]\n  }'\n```\n\n### Cloudflare Terraform\n\n```hcl\nresource \"cloudflare_ruleset\" \"waf_custom\" {\n  zone_id = var.zone_id\n  name    = \"Custom WAF Rules\"\n  kind    = \"zone\"\n  phase   = \"http_request_firewall_custom\"\n\n  rules {\n    action      = \"block\"\n    expression  = \"(http.request.uri.query contains \\\"union select\\\")\"\n    description = \"Block SQL injection in query string\"\n  }\n\n  rules {\n    action      = \"managed_challenge\"\n    expression  = \"(cf.threat_score gt 30)\"\n    description = \"Challenge suspicious visitors\"\n  }\n}\n```\n\n\n## Contents\n\n- [ModSecurity with Nginx](references\u002Fdetails.md)\n- [WAF Tuning Workflow](references\u002Fdetails.md)\n- [Troubleshooting](references\u002Fdetails.md)\n- [Best Practices](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nUse this skill when:\n- Deploying a public-facing web application that needs attack protection\n- Meeting compliance requirements (PCI-DSS, SOC2) for web application security\n- Blocking OWASP Top 10 attack categories (SQLi, XSS, CSRF, etc.)\n- Protecting APIs from abuse, injection, and rate-based attacks\n- Adding a virtual patching layer while application code is being fixed\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n","# WAF Setup\n\nProtect web applications with Web Application Firewalls.\n\n## Prerequisites\n\n- Web application behind a load balancer or reverse proxy\n- AWS account for AWS WAF, or Cloudflare account for Cloudflare WAF\n- Nginx with ModSecurity module compiled for self-hosted WAF\n- Access to application logs to tune rules and identify false positives\n- Understanding of HTTP request\u002Fresponse structure\n\n## AWS WAF\n\n### Create Web ACL with Managed Rules\n\n```bash\n# Create Web ACL with AWS managed rules\naws wafv2 create-web-acl \\\n  --name production-waf \\\n  --scope REGIONAL \\\n  --default-action Allow={} \\\n  --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=production-waf \\\n  --rules file:\u002F\u002Fwaf-rules.json\n```\n\n### AWS WAF Rules Configuration\n\n```json\n[\n  {\n    \"Name\": \"AWSManagedRulesCommonRuleSet\",\n    \"Priority\": 1,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesCommonRuleSet\",\n        \"ExcludedRules\": []\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSCommonRules\"\n    }\n  },\n  {\n    \"Name\": \"AWSManagedRulesSQLiRuleSet\",\n    \"Priority\": 2,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesSQLiRuleSet\"\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSSQLiRules\"\n    }\n  },\n  {\n    \"Name\": \"AWSManagedRulesKnownBadInputsRuleSet\",\n    \"Priority\": 3,\n    \"Statement\": {\n      \"ManagedRuleGroupStatement\": {\n        \"VendorName\": \"AWS\",\n        \"Name\": \"AWSManagedRulesKnownBadInputsRuleSet\"\n      }\n    },\n    \"OverrideAction\": { \"None\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"AWSBadInputRules\"\n    }\n  },\n  {\n    \"Name\": \"RateLimitRule\",\n    \"Priority\": 4,\n    \"Statement\": {\n      \"RateBasedStatement\": {\n        \"Limit\": 2000,\n        \"AggregateKeyType\": \"IP\"\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"RateLimit\"\n    }\n  },\n  {\n    \"Name\": \"GeoBlockRule\",\n    \"Priority\": 5,\n    \"Statement\": {\n      \"GeoMatchStatement\": {\n        \"CountryCodes\": [\"KP\", \"IR\", \"SY\"]\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"GeoBlock\"\n    }\n  },\n  {\n    \"Name\": \"BlockBadUserAgents\",\n    \"Priority\": 6,\n    \"Statement\": {\n      \"ByteMatchStatement\": {\n        \"SearchString\": \"sqlmap\",\n        \"FieldToMatch\": { \"SingleHeader\": { \"Name\": \"user-agent\" } },\n        \"TextTransformations\": [{ \"Priority\": 0, \"Type\": \"LOWERCASE\" }],\n        \"PositionalConstraint\": \"CONTAINS\"\n      }\n    },\n    \"Action\": { \"Block\": {} },\n    \"VisibilityConfig\": {\n      \"SampledRequestsEnabled\": true,\n      \"CloudWatchMetricsEnabled\": true,\n      \"MetricName\": \"BadUserAgent\"\n    }\n  }\n]\n```\n\n### Associate WAF with ALB\n\n```bash\n# Associate with Application Load Balancer\naws wafv2 associate-web-acl \\\n  --web-acl-arn arn:aws:wafv2:us-east-1:123456789:regional\u002Fwebacl\u002Fproduction-waf\u002Fabc123 \\\n  --resource-arn arn:aws:elasticloadbalancing:us-east-1:123456789:loadbalancer\u002Fapp\u002Fmy-alb\u002Fabc123\n\n# Associate with API Gateway\naws wafv2 associate-web-acl \\\n  --web-acl-arn arn:aws:wafv2:us-east-1:123456789:regional\u002Fwebacl\u002Fproduction-waf\u002Fabc123 \\\n  --resource-arn arn:aws:apigateway:us-east-1::\u002Frestapis\u002Fabc123\u002Fstages\u002Fprod\n```\n\n### AWS WAF Terraform\n\n```hcl\nresource \"aws_wafv2_web_acl\" \"main\" {\n  name        = \"production-waf\"\n  scope       = \"REGIONAL\"\n  description = \"Production WAF with OWASP protections\"\n\n  default_action {\n    allow {}\n  }\n\n  rule {\n    name     = \"AWSManagedRulesCommonRuleSet\"\n    priority = 1\n\n    override_action { none {} }\n\n    statement {\n      managed_rule_group_statement {\n        name        = \"AWSManagedRulesCommonRuleSet\"\n        vendor_name = \"AWS\"\n\n        rule_action_override {\n          name = \"SizeRestrictions_BODY\"\n          action_to_use { count {} }\n        }\n      }\n    }\n\n    visibility_config {\n      cloudwatch_metrics_enabled = true\n      metric_name                = \"AWSCommonRules\"\n      sampled_requests_enabled   = true\n    }\n  }\n\n  rule {\n    name     = \"RateLimit\"\n    priority = 10\n\n    action { block {} }\n\n    statement {\n      rate_based_statement {\n        limit              = 2000\n        aggregate_key_type = \"IP\"\n      }\n    }\n\n    visibility_config {\n      cloudwatch_metrics_enabled = true\n      metric_name                = \"RateLimit\"\n      sampled_requests_enabled   = true\n    }\n  }\n\n  visibility_config {\n    cloudwatch_metrics_enabled = true\n    metric_name                = \"production-waf\"\n    sampled_requests_enabled   = true\n  }\n}\n\nresource \"aws_wafv2_web_acl_association\" \"alb\" {\n  resource_arn = aws_lb.main.arn\n  web_acl_arn  = aws_wafv2_web_acl.main.arn\n}\n```\n\n## Cloudflare WAF\n\n### API Configuration\n\n```bash\n# List available WAF rulesets\ncurl -s \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" | jq '.result[] | {id, name, phase}'\n\n# Create a custom WAF rule\ncurl -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Custom WAF Rules\",\n    \"kind\": \"zone\",\n    \"phase\": \"http_request_firewall_custom\",\n    \"rules\": [\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.uri.query contains \\\"union select\\\" or http.request.uri.query contains \\\"1=1\\\")\",\n        \"description\": \"Block SQL injection patterns in query string\"\n      },\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.uri.path contains \\\"..%2f\\\" or http.request.uri.path contains \\\"..%5c\\\")\",\n        \"description\": \"Block path traversal attempts\"\n      },\n      {\n        \"action\": \"challenge\",\n        \"expression\": \"(cf.threat_score gt 30)\",\n        \"description\": \"Challenge high threat score visitors\"\n      },\n      {\n        \"action\": \"block\",\n        \"expression\": \"(http.request.headers[\\\"user-agent\\\"] contains \\\"sqlmap\\\" or http.request.headers[\\\"user-agent\\\"] contains \\\"nikto\\\")\",\n        \"description\": \"Block known attack tools\"\n      }\n    ]\n  }'\n\n# Configure rate limiting\ncurl -X POST \"https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${ZONE_ID}\u002Frulesets\" \\\n  -H \"Authorization: Bearer ${CF_TOKEN}\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Rate Limiting\",\n    \"kind\": \"zone\",\n    \"phase\": \"http_ratelimit\",\n    \"rules\": [\n      {\n        \"action\": \"block\",\n        \"ratelimit\": {\n          \"characteristics\": [\"ip.src\"],\n          \"period\": 60,\n          \"requests_per_period\": 100,\n          \"mitigation_timeout\": 600\n        },\n        \"expression\": \"(http.request.uri.path matches \\\"^\u002Fapi\u002F\\\")\",\n        \"description\": \"Rate limit API endpoints\"\n      }\n    ]\n  }'\n```\n\n### Cloudflare Terraform\n\n```hcl\nresource \"cloudflare_ruleset\" \"waf_custom\" {\n  zone_id = var.zone_id\n  name    = \"Custom WAF Rules\"\n  kind    = \"zone\"\n  phase   = \"http_request_firewall_custom\"\n\n  rules {\n    action      = \"block\"\n    expression  = \"(http.request.uri.query contains \\\"union select\\\")\"\n    description = \"Block SQL injection in query string\"\n  }\n\n  rules {\n    action      = \"managed_challenge\"\n    expression  = \"(cf.threat_score gt 30)\"\n    description = \"Challenge suspicious visitors\"\n  }\n}\n```\n\n\n## Contents\n\n- [ModSecurity with Nginx](references\u002Fdetails.md)\n- [WAF Tuning Workflow](references\u002Fdetails.md)\n- [Troubleshooting](references\u002Fdetails.md)\n- [Best Practices](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nUse this skill when:\n- Deploying a public-facing web application that needs attack protection\n- Meeting compliance requirements (PCI-DSS, SOC2) for web application security\n- Blocking OWASP Top 10 attack categories (SQLi, XSS, CSRF, etc.)\n- Protecting APIs from abuse, injection, and rate-based attacks\n- Adding a virtual patching layer while application code is being fixed\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n",{"name":5,"risk":32,"source":48,"license":14,"category":27,"metadata":49,"date_added":52,"description":7,"source_repo":53,"source_type":35,"compatibility":54,"license_source":55},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills",{"author":50,"version":51},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant security tooling (scanners, vault CLIs) and an authorized scope for any active assessment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fwaf-setup","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill waf-setup",{"tool":67,"command":68},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill waf-setup",{"tool":70,"command":71},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill waf-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fwaf-setup\u002FSKILL.md",true,[75],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fdetails.md","REFERENCE","参考文档",6932,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fwaf-setup\u002Freferences\u002Fdetails.md",[82,98,122,147,175,199],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":89,"publishedAt":43},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[88],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[90,91,92,93,41,94,84,95,39,96,38,36,35,34,33,32,31,30,29,97],"ZeRO","trust","zero trust","architecture","verification","segmentation","access","implementing",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":43},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[105,106,107,108,109,110,111,112,113,114,115,116,117,36,118,35,119,120,32,121],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":43},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[129,130,131,132,133,134,135,136,137,138,139,140,141,35,34,142,143,144,145,146],"transcript","youtube transcript","youtube","safe","github","codex","research","license","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":164,"publishedAt":43},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[153,156,159],{"categoryNo":154,"categoryName":155,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":157,"categoryName":158,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":160,"categoryName":161,"taxonomyType":162,"taxonomyTypeDesc":163},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[129,130,131,165,132,166,133,134,136,167,168,169,170,139,171,35,34,172,173,174],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":185,"publishedAt":43},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[181,184],{"categoryNo":182,"categoryName":183,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":157,"categoryName":158,"taxonomyType":20,"taxonomyTypeDesc":21},[131,186,187,109,132,188,189,190,191,136,169,192,193,194,195,34,196,142,197,198],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":206,"publishedAt":43},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[205],{"categoryNo":154,"categoryName":155,"taxonomyType":20,"taxonomyTypeDesc":21},[207,131,208,209,132,166,167,210,211,168,169,170,139,212,171,35,34,172,213,145],"youtube full","full","google","server","dlp","credits","automatic"]