Update "execCommand()" function on ACC | Community
Skip to main content
Level 2
June 11, 2020
Solved

Update "execCommand()" function on ACC

  • June 11, 2020
  • 3 replies
  • 4205 views

Hi All,

 

As part of a requirement, we want to remove some logging statements in the function "execCommand(systemCommand, true)"  in the Workflow javascript activity.

but we couldn't find the origin/implementation of this function in any of the javascript codes on the client console.

 

Please help us, where we can edit this function.

 

Thanks in Advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

The workflow logs are mutable- they're just rows in xtk:workflowLog.

Create a wrapper for execCommand() that runs execCommand and then deletes the log rows it generated.

 

Thanks,

-Jon

3 replies

Darren_Bowers
Level 9
June 11, 2020

Hi @muralipraveenr1 - can you give us an example of the logs you are seeing?

Level 2
June 12, 2020

Hi @darren_bowers ,

LOG: XSV-350201 Execute the command 'curl -v  -k 'sftp://<serverURL>' --user "username:password" -Q "rm ‘filename’” with user.

As you can see we had to pass the password as part of the curl command, but with the command getting logged, there’s a chance for the password breach to the groups which are not intended to see the password. so if there's any way to avoid this log that would be helpful.

Thanks!

Milan_Vucetic
Level 9
June 12, 2020

Hi @muralipraveenr1 

 

I do not think this is possible.

You can blacklist some commands (like: ln, dd, openssl, curl, wget, python, python3, perl, ruby, sh, bash, dash, zsh, base64, nlserver, node, phantomjs, java, awk, nc, telnet, ssh, scp, ftp) in exec part in serverConf.xml

You may try with execCommand(systemCommand, false) which should disable output.

If not, you may consider using Bash script inside JS to avoid this command.

 

Regards,

Milan

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
June 15, 2020

Hi,

 

The workflow logs are mutable- they're just rows in xtk:workflowLog.

Create a wrapper for execCommand() that runs execCommand and then deletes the log rows it generated.

 

Thanks,

-Jon