From bbe413140fb8e004f4203f9570b8068cbe5207f3 Mon Sep 17 00:00:00 2001 From: Aaron Meihm Date: Wed, 9 Nov 2016 15:51:08 -0600 Subject: [PATCH] launch scans after api creation --- scanapi/scanapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scanapi/scanapi.py b/scanapi/scanapi.py index 238fa2c..5ee1288 100755 --- a/scanapi/scanapi.py +++ b/scanapi/scanapi.py @@ -139,6 +139,8 @@ class ScanAPIScanner(object): sid = self._unique_scan_id() self._scanner.policy_copy(policy, sid) self._scanner.scan_add(targets=targets, name=sid) + scan = self._scan_from_scanid(sid) + self._scanner.action(action='scans/' + str(scan['id']) + '/launch', method='post') return {'scanid': sid} def scan_completed(self, scanid):