Triage CVE advisories with a bar per severity
Your task
Your security team gets about 300 CVE advisories a week (public reports of a security flaw in some piece of software), and most do not affect your stack. Missing one critical is far worse than 100 false alarms, so each severity gets its own rule.
Write triage_cve_advisories(severities, match_confidences, internet_exposed): the rule your agent follows for each advisory.
severities(list of str): each advisory's severity:"low","medium","high"or"critical", in any case.match_confidences(list of int): how sure the agent is, from 0 to 100, that the advisory matches software you run. Treat a value below 0 as 0 and one above 100 as 100.internet_exposed(list of bool): whether the affected service can be reached from the internet.- The 3 lists have the same length, and index
iis one advisory. Return one decision per advisory, in order:"escalate","human_review"or"dismiss".
With c the confidence after that clamp, by severity:
low:"escalate"if the service is exposed andcis at least 80. Otherwise"dismiss".medium:"escalate"ifcis at least 70, or ifcis at least 50 and the service is exposed. Otherwise"dismiss"ifcis below 20 and the service is not exposed. Otherwise"human_review".high:"escalate"ifcis at least 40, or ifcis at least 20 and the service is exposed. Otherwise"human_review".critical, and any severity not listed above:"escalate"ifcis at least 20 or the service is exposed. Otherwise"human_review".
Then, in a sentence or two: why not one confidence bar for every severity?
Examples
triage_cve_advisories(severities: list[str], match_confidences: list[int], internet_exposed: list[bool]) -> list[str]Example 1
Input
triage_cve_advisories(["critical", "low", "high"], [10, 95, 45], [False, True, False])Output
["human_review", "escalate", "escalate"]Example 2
Input
triage_cve_advisories(["MEDIUM", "medium"], [70, 10], [False, False])Output
["escalate", "dismiss"]Example 3
Input
triage_cve_advisories(["low"], [95], [False])Output
["dismiss"]