You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, it would be useful to be able to rerun a scan after performing remediation.
The rerun functionality request implies a few deliverables:
Scans have a history
Scans are configuration items, not execution items
Scans have job control state (start/stop)
Scan
Current Behavior
The current design of a Scan is that the user must create it every time they would like to kick one off. There is no concept of a "scan history", since each scan is its own entity.
Scan As A Configuration Item
If we move the current Scan behavior into a new model, ScanRun, then a Scan becomes a configuration element, of sorts. This has some advantages:
Users will be able to easily click "run scan" without having to configure it (once configured, of course)
A "re-scan" button can be available in the scan summary page, allowing the scan to be rereun
Scanning history will be available
Opens the door for scans to be run automatically on a schedule
Opens the door to organize scans in the future (folders, disable, archive, etc...)
The ScanAsset model will be updated so that its scan property will instead point to a ScanRun instance (as opposed to a Scan). The ScanAsset model will continue to be directly tied to a single Celery task
Asset Lock Check
Since assets can now be referenced in multiple ScanVersion instances, it's important to let the user know that modifying an Asset will impact one or more Scan configurations.
Asset Deletion -> Archived
Asset deletion can only occur when any and all scans that reference the asset have been archived. Asset deletion will need to be changed so that it is archived, rather than deleted. Historical scan results will need to reference the asset.
Asset Edit
Prior to an asset being saved, the user should be notified of all the scans which reference the asset. The user should be prompted with a confirmation dialog to accept that the list of scans will be impacted. If ANY of the scans are currently running, the edit will NOT be performed.
Scan Versioning
Like the PolicyVersion model, a new ScanVersion entity will keep track of when the configuration of a Scan is modified. This will allow users the ability to edit a scan, without impacting previous scan runs results.
UI Changes
Creating a new Scan now does not kick off a scan. Instead, it simply sets up the configuration FOR a scan. That means the current dashboard functionality will need to be updated, and some new views will be added.
Scan Dashboard
The Scan dashboard will be modified to show the list of configured scans. For each scan the following items will be shown:
Name of the scan
DateTime of when the scan configuration was last modified
Current version number
Number of assets configured
Number of policies configured
DateTime of the last scan run
VCR controls to start/stop the scan
Button to view the most recent scan results
Button to view scan run history
Scan History Page
Now that a Scan has zero or more ScanRun instances associated with it, we need a way to display them. This page will display a paginated list of ScanRun objects, sorted by start time. For each ScanRun object, display the following:
Start/Stop DateTime
Duration
Status
Findings Count
Button to the details page
ScanVersion used
Scan Start/Stop/State
As noted in the UI Changes above, VCR controls will be added to start/stop a scan. View routes will need to be added to fetch the current state of a scan, start a scan, and stop a scan (which cancels it - not pause).
Scan Re-Run
Finally - we reach the meat of the user story - the ability to rerun a scan.
In the scan results page, a new button will be available to re-run the scan. The button will only be available if the scan is not currently running. If the user clicks on the button, but the scan has somehow started by another user, the button will be disabled with a busy icon, noting a scan is currently running.
The text was updated successfully, but these errors were encountered:
As a user, it would be useful to be able to rerun a scan after performing remediation.
The rerun functionality request implies a few deliverables:
Scan
Current Behavior
The current design of a
Scan
is that the user must create it every time they would like to kick one off. There is no concept of a "scan history", since each scan is its own entity.Scan As A Configuration Item
If we move the current
Scan
behavior into a new model,ScanRun
, then aScan
becomes a configuration element, of sorts. This has some advantages:New
Scan
model:New
ScanVersion
model:New
ScanRun
model:The
ScanAsset
model will be updated so that itsscan
property will instead point to aScanRun
instance (as opposed to aScan
). TheScanAsset
model will continue to be directly tied to a single Celery taskAsset Lock Check
Since assets can now be referenced in multiple
ScanVersion
instances, it's important to let the user know that modifying an Asset will impact one or moreScan
configurations.Asset Deletion -> Archived
Asset deletion can only occur when any and all scans that reference the asset have been archived. Asset deletion will need to be changed so that it is archived, rather than deleted. Historical scan results will need to reference the asset.
Asset Edit
Prior to an asset being saved, the user should be notified of all the scans which reference the asset. The user should be prompted with a confirmation dialog to accept that the list of scans will be impacted. If ANY of the scans are currently running, the edit will NOT be performed.
Scan Versioning
Like the
PolicyVersion
model, a newScanVersion
entity will keep track of when the configuration of aScan
is modified. This will allow users the ability to edit a scan, without impacting previous scan runs results.UI Changes
Creating a new
Scan
now does not kick off a scan. Instead, it simply sets up the configuration FOR a scan. That means the current dashboard functionality will need to be updated, and some new views will be added.Scan Dashboard
The Scan dashboard will be modified to show the list of configured scans. For each scan the following items will be shown:
Scan History Page
Now that a
Scan
has zero or moreScanRun
instances associated with it, we need a way to display them. This page will display a paginated list ofScanRun
objects, sorted by start time. For each ScanRun object, display the following:Scan Start/Stop/State
As noted in the UI Changes above, VCR controls will be added to start/stop a scan. View routes will need to be added to fetch the current state of a scan, start a scan, and stop a scan (which cancels it - not pause).
Scan Re-Run
Finally - we reach the meat of the user story - the ability to rerun a scan.
In the scan results page, a new button will be available to re-run the scan. The button will only be available if the scan is not currently running. If the user clicks on the button, but the scan has somehow started by another user, the button will be disabled with a busy icon, noting a scan is currently running.
The text was updated successfully, but these errors were encountered: