SOLVED

Can I use ASC Workflow automation to install Qualys agent?

Iron Contributor

We have the following recommendation in ASC - Enable the built-in vulnerability assessment solution on virtual machines (powered by Qualys) (Preview) - that has some VMs that need the agent.

 

Within the recommendation I can remediate, but is there anyway to use Workflow automation to look for VMs that do not have the Qualys agent and to install it?

 

I tried creating a Logic app and copied and pasted the remediation logic from the recommendation, but it did not work.

 

Thx 

12 Replies
best response confirmed by Jeff Walzer (Iron Contributor)

@Nicholas DiCola (SECURITY JEDI) 

Thx a million - I just tried to deploy the playbook and got the following error:

Capture.JPG
 

whoops forgot the dependson. in the resource.

just fixed the template.

@Nicholas DiCola (SECURITY JEDI) 

 

Thx again Nick - for my edification, the workflow will kick in when it sees an unhealthy resource in the Enable the built-in vulnerability assessment solution on virtual machines (powered by Qualys) (Preview) recommendation, correct?

 

We have some VMs that are powered off so I am assuming when they get powered on, the workflow will run to install the Qualys agent.

 

And last question, can you point me to some documentation about ASC workflow?

 

TYVM

@Jeff Walzer 

yes but you need to create the workflow automation like this

 

2020-04-01_7-53-08.png

 

 here is the docs page https://docs.microsoft.com/en-us/azure/security-center/workflow-automation

@Nicholas DiCola (SECURITY JEDI)

 

Perfect as that's how I configured it,

 

Thx for the link 

@Nicholas DiCola (SECURITY JEDI

 

Sorry to be a pain, but I ran into an error as I turned on a VM and then checked the logic app and saw that it failed

 

Capture.JPG 

 

{
  "error": {
    "code": "AuthenticationFailed",
    "message": "Authentication failed. The 'Authorization' header is missing."
  }
}

@Jeff Walzer 

the template creates two api connection resources. you have to authorize them.  go to the resource.  click edit api connection.  click authorize.  login in the new window.  click save.

2020-04-01_11-10-10.png

 

 

 

@Nicholas DiCola (SECURITY JEDI)

 

API now authorized and when I do a 'Run Trigger' I get the following error message:

 

InvalidTemplate. Unable to process template language expressions in action 'Create_or_update_a_template_deployment' inputs at line '1' and column '3277': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.'.

 

@Jeff Walzer 

you cant just run trigger from logic apps as no data is passed to the ASC trigger step.

 

go to the recommendation in ASC and click run playbook.  that will push the recommendation data to the trigger.

@Nicholas DiCola (SECURITY JEDI) - thx as it's working now. Appreciate all the help!

@Nicholas DiCola (SECURITY JEDI) 

 

Hi Nicholas, thanks for super usefull logic app. 

I made the setup you have described, I used automation workflow for ASC recommendation (A vulnerability assessment solution should be enabled on your virtual machines) with logic app to create ARM deployment. And it works well when I trigger Logic App from ASC (Azure Portal) but the automation workflow does not trigger my logic app at all. Is it possible that when the recommendation exist with many VM's in state not-applicable and unhealthy then any new VM which appear with unhealthy state will not trigger automation ? because the recommendation exist ? In short for existing recommendation new resource won't trigger the workflow automation ? 

 

Thanks in advance for any insides ... 

Br, Kris

1 best response

Accepted Solutions