脅威インテリジェンスフィールド を使う カスタムルール と レート制限ルール の例です。フィールドはすべて配列です。any() を [*] と組み合わせて使います。
適用前に一致を確認するには、Log(Enterprise プラン)でデプロイします。
- 式:
any(cf.intel.ip.attacker_names[*] != "") - アクション: Log
Security Events で一致を確認してから、アクションを Block または Managed Challenge に変更します。
- 式:
any(cf.intel.ip.target_countries[*] == "FR") and any(cf.intel.ip.datasets[*] == "ddos") - アクション: Block
- 式:
any(cf.intel.ip.target_industries[*] == "Banking & Financial Services") and any(cf.intel.ip.attacker_names[*] == "BLACKBASTA") - アクション: Managed Challenge
- 式:
any(cf.intel.ip.attacker_countries[*] == "CN") - アクション: Block
WAF の脅威インテリジェンスデータセットでフラグが付いたリクエストのうち、攻撃スコア も低いものをブロックします。
- 式:
any(cf.intel.ip.datasets[*] == "waf") and cf.waf.score lt 20 - アクション: Block
フラグ付き IP に対して、API 上でより厳しいレートを適用する レート制限ルール です。
- 式:
any(cf.intel.ip.datasets[*] == "ddos") and starts_with(http.request.uri.path, "/api/") - アクション: レートを超えたときに Block。