feat(report): add results filtering
Opened this issue · 0 comments
ocervell commented
Features
- Grab reports using a match (
secator report list
) - Filter results in specific reports using a match and filter
Implementation
secator report list -ws <WORKSPACE> -m <MATCH>
secator report show /path/to/report.json -m <MATCH> -f <FILTER>
We could maybe use jq
for this so that it gets compatible with multiple backends.
We can call jq
as a Python library which will be more user-friendly (needs addon).
Use cases
Show all ports matching a certain IP:
secator report show /path/to/report.json -m port.ip == 127.0.0.1 -f port.port
would result in:
cat /path/to/report.json | jq '.results.port[] | select(.ip == "127.0.0.1") | .port'
MATCH FILTER
List all reports where *domain.com is found:
secator report list -f "url.host ~= "*domain.com"