Patterns on Agent (Regression): Commands randomly failing with allowlist errors DescriptionPatterns on agent has an issue where if a previous step within a pattern fails, it results in the error propagating to additional steps. This can result in the pattern failing when an error in a previous step that is expected is forwarded to the next step where a failure is not expected. The most prevalent error noticed is when an allow-list exclusion error was logged in the pattern output, even though the step was successful. Steps to Reproduce Have a discovery pattern with 2 commands (1) command which will return null and will be added to allow list (2) a command not in allow list and will get denied.Additionally since we are dealing with discovery patterns add all the steps that come before the actual pattern steps like those in process detection, example: netstat, ss, cat, etc. This is so other commands do not come in the middle of the other 2 commands which we are using to replicate the race conditionHave steps in a particular pattern used for testing to have a command like 'hostname > /dev/null'' as step1 and step3 which is added to allow list and a command like echo hi which is not added to allow list and will get eventually denied.Trigger agent data collection (or just the pattern alone)Note the error from the previous step is present for the output of the current step.WorkaroundNone.Related Problem: PRB1916650