Notifications

106 views

Description

For "Parse Command Output" Operation in Pattern, if you change "Execution Mode" from Default (Remote) to something else, run it, then change it back to Default (Remote), below error pops:

Failed to retrieve remote data: Failed to execute task, PatternDebuggerTask, with failure message: No enum constant com.snc.sw.kb.lang.commands.ExecutionMode.DEFAULT.

If the pattern is saved, then the issue is saved along with the pattern.

 

The issue is because the steps to reproduce will insert text "[execution_mode = "DEFAULT"]" with the pattern step, which will cause the error.

 

Steps to Reproduce

1) Setup Discovery on your instance and have a Windows or LInux server to scan
1a) Run a Discovery against this server so that you have the IP to be able to debug

2) Depending on the type of server you are scanning, open the Windows OS - Servers pattern (Windows) or Linux Server pattern (Linux) in the pattern debugger
3) Go into debug mode and enter the IP of the server you are testing against
4) Add a step to the top of the Patten and select the Operation "Parse Command Output"
5) For the "Set Command Details", put in a simple command (ex. "dir" or "whoami" for Windows, "ls" or "pwd" for Linux)
6) Once you have the proper command, click on the "Run Command" button, and you should see the expected output of your command in this window

7) Now, in this same step, click on the "Advanced Details" checkbox and see that the value of "Execution Mode" is set to "Default (Remote)".
8) Keeping this value checked, you can run "Run Command" again and see it should still work fine

9) Now, change the value of "Execution Mode" to a different value (ex. Local Script), then change back to "Default (Remote)".
9a) Or, alternatively, you can change the "Set Command Details" value to a different command while this box is checked
10) Now, run the "Run Command" again and you should now get an error to occur like below

" Failed to retrieve remote data: Failed to execute task, PatternDebuggerTask, with failure message: No enum constant com.snc.sw.kb.lang.commands.ExecutionMode.DEFAULT."

11) Even if you then try to uncheck this "Advanced Details" checkbox and then "Run Command", you will still get this error to occur.
12) If you then save the pattern with this issue occurring, if you then reload the pattern, the issue will now continue to occur.

Workaround

If your change is not saved along with the pattern yet, click on "Discard" button.

If your change has been saved into the pattern, then navigate to Pattern Designer > Discovery Patterns > open the pattern >

Pattern tab > Pattern Text > search and delete [execution_mode = "DEFAULT"] > save and publish the pattern

===

Please review the "Intended Fix Version" section below below to determine the versions that have a permanent fix.


Related Problem: PRB1389930

Seen In

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3

Fixed In

Paris

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-10-04 23:27:29
Published:2020-05-14