Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(report): add results filtering #380

Closed
2 tasks done
ocervell opened this issue May 3, 2024 · 0 comments · Fixed by #445
Closed
2 tasks done

feat(report): add results filtering #380

ocervell opened this issue May 3, 2024 · 0 comments · Fixed by #445
Assignees
Labels
enhancement New feature or request reports

Comments

@ocervell
Copy link
Contributor

ocervell commented May 3, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reports
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant