You would not be the first person to conflate the inputlookup and lookup commands. This is a classic use case for lookup. Insert the lookup command late in the query to pull the reason from the CSV. index=vulnerability severity=critical
| eval first_found=replace (first_found, "T\S+", "")
| eval first_found_epoch=strptime(first_found, "%Y-%m-%d")
| eval last_found=replace (last_found, "T\S+", "")
| eval last_found_epoch=strptime(last_found, "%Y-%m-%d")
| eval last_found_65_days=relative_time(last_found_epoch,"-65d@d")
| fieldformat last_found_65_days_convert=strftime(last_found_65_days, "%Y-%m-%d")
| where first_found_epoch>last_found_65_days
| sort -first_found
| dedup cve
| lookup mylookup.csv ScanHost as asset_fqdn target-CVE as cve OUTPUT Reason
| rename severity AS Severity, first_found AS "First Found", last_found AS "Last Found", asset_fqdn AS Host, ipv4 AS IP, cve AS CVE, output AS Description
| streamstats count as "Row #"
| table Severity,"First Found","Last Found",Host,IP,CVE,Description,Reason Pro tip: do everything you can to avoid using hyphens in field names. Splunk sometimes interprets it as a minus operator, which can break a query.
... View more