触发器资源类型
触发器资源类型描述已设置为在 WebSphere Automation 中检测事件并在满足指定条件时启动操作的触发器。
示例触发器已创建事件
{
"type" : "CREATE",
"trigger" : {
"created" : "2023-06-12T12:46:28Z",
"createdBy" : "admin",
"description" : "Triggers the Slack Notification action when a vulnerability with a CVE that has a CVSS base score greater than 9 is created.",
"id" : "cd7618c4-436c-4f4b-93c8-50b28b5c6a2a",
"name" : "Vulnerability Created Trigger",
"updated" : "2023-06-12T12:46:28Z",
"updatedBy" : "admin",
"actionId" : "3668814e-3f4b-453c-b301-1ce161870bca",
"enabled" : true,
"type" : "resource",
"variableMappings" : {
"hostName" : "$asset.hostName",
"cveSummary" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].description)",
"bulletinUrl" : "$bulletin.url",
"cveId" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].id)",
"icon" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); $maxCvssBaseScore > 0 and $maxCvssBaseScore <= 3.9 ? ':warning:' : ($maxCvssBaseScore >= 4 and $maxCvssBaseScore <= 6.9 ? ':standup_ibm_status_major_warning_orange:' : ($maxCvssBaseScore >= 7 and $maxCvssBaseScore <= 8.9 ? ':ibm-warning-filled:' : ':alert1:')))",
"serverName" : "$asset.serverName",
"cvssBaseScore" : "$number($max(vulnerability.cves.cvssBaseScore))",
"isJdk" : "$asset.type = 'jdk'",
"serverId" : "$asset.id",
"productName" : "$asset.productName"
},
"configuration" : {
"operation" : "create",
"resourceType" : "vulnerability"
}
}
}
示例触发器更新事件
{
"type" : "UPDATE",
"trigger" : {
"created" : "2023-06-12T12:46:28Z",
"createdBy" : "admin",
"description" : "Triggers the Slack Notification action when a vulnerability with a CVE that has a CVSS base score greater than 9 is created.",
"id" : "cd7618c4-436c-4f4b-93c8-50b28b5c6a2a",
"name" : "Vulnerability Created Trigger",
"updated" : "2023-06-12T12:49:13Z",
"updatedBy" : "admin",
"actionId" : "3668814e-3f4b-453c-b301-1ce161870bca",
"condition" : "$count(vulnerability.cves[cvssBaseScore > 9 ]) > 0",
"enabled" : true,
"type" : "resource",
"variableMappings" : {
"hostName" : "$asset.hostName",
"cveSummary" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].description)",
"bulletinUrl" : "$bulletin.url",
"cveId" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].id)",
"icon" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); $maxCvssBaseScore > 0 and $maxCvssBaseScore <= 3.9 ? ':warning:' : ($maxCvssBaseScore >= 4 and $maxCvssBaseScore <= 6.9 ? ':standup_ibm_status_major_warning_orange:' : ($maxCvssBaseScore >= 7 and $maxCvssBaseScore <= 8.9 ? ':ibm-warning-filled:' : ':alert1:')))",
"serverName" : "$asset.serverName",
"cvssBaseScore" : "$number($max(vulnerability.cves.cvssBaseScore))",
"isJdk" : "$asset.type = 'jdk'",
"serverId" : "$asset.id",
"productName" : "$asset.productName"
},
"configuration" : {
"operation" : "create",
"resourceType" : "vulnerability"
}
},
"originalVersion" : {
"created" : "2023-06-12T12:46:28Z",
"createdBy" : "admin",
"description" : "Triggers the Slack Notification action when a vulnerability with a CVE that has a CVSS base score greater than 9 is created.",
"id" : "cd7618c4-436c-4f4b-93c8-50b28b5c6a2a",
"name" : "Vulnerability Created Trigger",
"updated" : "2023-06-12T12:46:28Z",
"updatedBy" : "admin",
"actionId" : "3668814e-3f4b-453c-b301-1ce161870bca",
"enabled" : true,
"type" : "resource",
"variableMappings" : {
"hostName" : "$asset.hostName",
"cveSummary" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].description)",
"bulletinUrl" : "$bulletin.url",
"cveId" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].id)",
"icon" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); $maxCvssBaseScore > 0 and $maxCvssBaseScore <= 3.9 ? ':warning:' : ($maxCvssBaseScore >= 4 and $maxCvssBaseScore <= 6.9 ? ':standup_ibm_status_major_warning_orange:' : ($maxCvssBaseScore >= 7 and $maxCvssBaseScore <= 8.9 ? ':ibm-warning-filled:' : ':alert1:')))",
"serverName" : "$asset.serverName",
"cvssBaseScore" : "$number($max(vulnerability.cves.cvssBaseScore))",
"isJdk" : "$asset.type = 'jdk'",
"serverId" : "$asset.id",
"productName" : "$asset.productName"
},
"configuration" : {
"operation" : "create",
"resourceType" : "vulnerability"
}
}
}
示例触发器已删除事件
{
"type" : "DELETE",
"trigger" : {
"created" : "2023-05-26T13:14:42Z",
"createdBy" : "admin",
"description" : "Triggers the Slack Notification action when a vulnerability with a CVE that has a CVSS base score greater than 9 is created.",
"id" : "46e65c6e-8c9d-4fe9-90fb-ac5ca2303fae",
"name" : "Vulnerability Created Trigger",
"updated" : "2023-06-05T16:16:36Z",
"updatedBy" : "admin",
"actionId" : "74313a6b-a163-4f7d-833b-31bf4f12670a",
"enabled" : true,
"type" : "resource",
"variableMappings" : {
"hostName" : "$asset.hostName",
"cveSummary" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].description)",
"bulletinUrl" : "$bulletin.url",
"cveId" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); vulnerability.cves[cvssBaseScore = $maxCvssBaseScore][0].id)",
"icon" : "($maxCvssBaseScore := $max(vulnerability.cves.cvssBaseScore); $maxCvssBaseScore > 0 and $maxCvssBaseScore <= 3.9 ? ':warning:' : ($maxCvssBaseScore >= 4 and $maxCvssBaseScore <= 6.9 ? ':standup_ibm_status_major_warning_orange:' : ($maxCvssBaseScore >= 7 and $maxCvssBaseScore <= 8.9 ? ':ibm-warning-filled:' : ':alert1:')))",
"serverName" : "$asset.serverName",
"cvssBaseScore" : "$number($max(vulnerability.cves.cvssBaseScore))",
"isJdk" : "$asset.type = 'jdk'",
"serverId" : "$asset.id",
"productName" : "$asset.productName"
},
"configuration" : {
"operation" : "create",
"resourceType" : "vulnerability"
}
}
}