AI rules

akamai_appsec_waf_ai_rules

Get information about your AI rules.

data "akamai_appsec_waf_ai_rules" "my_ai_rules" {
  config_id          = 12345
  security_policy_id = "abcd_123456"
}
Changes to Outputs:
my_ai_rules = {
  ai_rule_status     = "ENABLED"
  ai_rules           = [
    {
      action              = "alert"
      condition_exception = jsonencode([])
      risk_score_group    = "XSS_AI"
      rule_description    = "According to OWASP, Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected into the otherwise benign and trusted web sites. Cross-Site Scripting (XSS) attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user in the output it generates without validating or encoding it. An attacker can use XSS to send a malicious script to an unsuspecting user.||In order to mount a Cross-Site Scripting attack, hackers are constantly trying to find and exploit new XSS vulnerabilities by embedding malicious code in client-side scripts. Hackers also employ AI based tools to detect XSS vulnerabilities and generate attacks.||This rule is operated by AI that targets Cross-Site Scripting Attacks. The protections of this rule evolves as new type of attacks are identified by AI. The group exceptions for Cross-Site Scripting (XSS) attack group will apply here."
      rule_id             = 3001001
      rule_version        = 1
      title               = "AI-Detected XSS Attack"
    },
    {
      action              = "alert"
      condition_exception = jsonencode([])
      risk_score_group    = "SQL_AI"
      rule_description    = "A SQL Injection attack consists of insertion or \"injection\" of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system.||In order to perform SQL Injection attacks, hackers are constantly trying to find and exploit new SQL vulnerabilities. Hackers also employ AI based tools to detect SQL vulnerabilities and generate attacks.||This rule is operated by AI that targets SQL Injection Attacks. The protections of this rule evolves as new type of attacks are identified by AI. The group exceptions for SQL Injection attack group will apply here."
      rule_id             = 3001000
      rule_version        = 1
      title               = "AI-Detected SQL Injection Attack"
    },
  ]
  config_id          = 12345
  id                 = "12345:abcd_123456"
  security_policy_id = "abcd_123456"
}

Arguments

Pass a security configuration and policy ID to get your AI rule details.

ArgumentRequiredDescription
config_id✔️Your security configuration's ID.
security_policy_id✔️Your security policy's ID.

Attributes

Returned to you are your AI rule settings.

AttributeDescription
ai_rule_statusThe security policy's AI rules enablement state. Possible values are:
  • ENABLED
  • DISABLED
  • NOT_ENROLLED
Note: A value of NOT_ENROLLED occurs when the security policy does not have AI rules enabled.
ai_rulesA list of your security policy's AI rules. Contains:
  • rule_id. The AI rule's ID.
  • rule_version. The AI rule's version.
  • title. The name of your AI rule.
  • risk_score_group. The risk score group to which the AI rule belongs.
  • rule_description. A human-readable statement about what the AI rule detects.
  • action. The action taken on trigger of the AI rule. Possible values are:
    • alert. Records the event.
    • deny. Blocks the event.
    • deny_custom_{custom_deny_id}. Takes your custom action against the event.
    • none. No action taken.
  • condition_exception. A JSON-encoded list of group-level condition exceptions for the AI rule.

Did this page help you?