Workspaces
... or how to keep each engagement's results separate.
A workspace is a named container for reports and findings. Every task, workflow and scan runs in a workspace, and every query reads from one. Use one workspace per engagement, client or project to keep their results apart.
When you don't choose one, secator uses the default workspace.
How workspaces are stored
With the default local backend, each workspace is a folder in your reports directory:
~/.secator/reports/
├── default/
│ ├── tasks/
│ ├── workflows/
│ └── scans/
└── mydomain/
├── tasks/
├── workflows/
└── scans/See Querying results & reports for the full report layout.
With the mongodb, sqlite or api Drivers, the workspace is saved with each runner and finding, so queries on these backends are also scoped to a workspace.
Running in a workspace
Pass -ws to any task, workflow or scan to run it in a workspace. If the workspace doesn't exist yet, it's created:
Managing workspaces
The secator workspace command (or secator ws) manages workspaces.
Switching the current workspace
secator ws use <NAME> sets the current workspace. Runs without -ws, and commands like secator q and secator r show without -w, then use it:
The workspace folder is created if it doesn't exist. secator ws create <NAME> is an alias of use.
The current workspace is stored in the workspaces.current config key, so this also works:
Showing the current workspace
Listing workspaces
With the local backend, the table shows each workspace's name, number of runs and folder. With the mongodb, sqlite or api backend (--driver or drivers.defaults), it shows the name, id, description, run count and findings count.
Deleting a workspace
secator ws rm <NAME> deletes a workspace and all its reports. It shows what will be deleted and asks for confirmation. Use -y / --yes to skip the prompt:
With the local backend, the workspace folder is removed. With the mongodb or sqlite backend, the workspace's runners and findings are also deleted from the database. With the api backend, a delete request is sent to the API.
secator ws remove and secator ws delete are aliases of rm.
Summarizing a workspace
secator ws summary prints an overview of the findings in a workspace:
The built-in summary shows:
the top ports, hosts (IPs), subdomains, technologies and URLs,
unique vulnerabilities by severity and by status,
the top vulnerabilities, ranked by number of targets hit.
Use --driver to read from another backend, e.g. secator ws summary -w mydomain --driver mongodb.
Custom summary templates
The summary is a Jinja2 template. Use --template to render your own:
In the template, workspace is the workspace name, and query(...) (or its alias q(...)) runs a query and returns its output as text, one row per line. It takes the same options as secator q:
For example:
You can use Rich markup like [bold]...[/] for styling. A query with no results renders as (none).
Default profiles per workspace
You can apply Profiles automatically to every run in a given workspace with workspaces.profiles.<workspace>:
These profiles are added to the global profiles.defaults and to any profiles passed with -pf.
Here, every run in the acme-external workspace is passive and polite:
Setting the workspace in a profile
A custom profile can also choose the workspace, with the workspace key:
The run's report files are written under the profile's workspace, and that workspace's workspaces.profiles are applied. A workspace set in a profile that is itself listed in workspaces.profiles is ignored.
How the workspace is chosen
When a run starts, its workspace is picked in this order:
The
workspaceof an enforced profile (enforce: true).The
-wsoption.The
workspaceof a non-enforced profile.The current workspace (
workspaces.current, set withsecator ws use).default.
Example: one workspace per engagement
Last updated