secator 0.16.3__tar.gz → 0.16.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of secator might be problematic. Click here for more details.
- {secator-0.16.3 → secator-0.16.4}/CHANGELOG.md +9 -0
- {secator-0.16.3 → secator-0.16.4}/PKG-INFO +1 -1
- {secator-0.16.3 → secator-0.16.4}/cloudbuild.yaml +4 -3
- {secator-0.16.3 → secator-0.16.4}/pyproject.toml +1 -1
- {secator-0.16.3 → secator-0.16.4}/secator/celery.py +26 -3
- {secator-0.16.3 → secator-0.16.4}/secator/hooks/gcs.py +1 -1
- {secator-0.16.3 → secator-0.16.4}/secator/hooks/mongodb.py +22 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/_base.py +8 -4
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/dalfox.py +1 -0
- {secator-0.16.3 → secator-0.16.4}/.coderabbit.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.alpine +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.arch +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.debian +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.kali +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.osx +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/Dockerfile.ubuntu +0 -0
- {secator-0.16.3 → secator-0.16.4}/.docker/build_all.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/.dockerignore +0 -0
- {secator-0.16.3 → secator-0.16.4}/.flake8 +0 -0
- {secator-0.16.3 → secator-0.16.4}/.gitignore +0 -0
- {secator-0.16.3 → secator-0.16.4}/CONTRIBUTING.md +0 -0
- {secator-0.16.3 → secator-0.16.4}/Dockerfile +0 -0
- {secator-0.16.3 → secator-0.16.4}/LICENSE +0 -0
- {secator-0.16.3 → secator-0.16.4}/README.md +0 -0
- {secator-0.16.3 → secator-0.16.4}/SECURITY.md +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/.helmignore +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/Chart.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/templates/redis-service.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/templates/redis.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/templates/secator-manager.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/templates/secator-worker.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/helm/values.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/download_cves.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/generate_tools_md_table.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/install.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/install_asciinema.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/install_go.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/install_ruby.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/msf/exploit_cve.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/msf/ftp_anonymous.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/msf/ftp_version.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/msf/ftp_vsftpd_234_backdoor.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/msf/redis.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/STORY.md +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/aliases.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/demo.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/fmt.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/input.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/pipe.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/stories/short_demo.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/scripts/update_tools.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/.gitignore +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/celery_signals.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/celery_utils.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/cli.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/cli_helper.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/click.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/config.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/aggressive.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/http_headless.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/http_record.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/insane.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/paranoid.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/polite.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/sneaky.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/profiles/tor.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/domain.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/host.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/network.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/subdomain.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/scans/url.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/cidr_recon.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/code_scan.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/host_recon.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/subdomain_recon.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_bypass.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_crawl.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_dirsearch.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_fuzz.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_params_fuzz.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/url_vuln.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/user_hunt.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/configs/workflows/wordpress.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/cve.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/decorators.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/definitions.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/_base.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/console.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/csv.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/gdrive.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/json.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/table.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/exporters/txt.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/hooks/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/installer.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/loader.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/_base.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/certificate.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/error.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/exploit.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/info.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/ip.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/port.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/progress.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/record.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/stat.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/state.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/subdomain.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/tag.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/target.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/url.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/user_account.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/vulnerability.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/output_types/warning.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/report.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/rich.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/_helpers.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/celery.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/command.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/scan.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/task.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/runners/workflow.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/scans/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/serializers/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/serializers/dataclass.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/serializers/json.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/serializers/regex.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/_categories.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/arjun.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/bbot.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/bup.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/cariddi.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/dirsearch.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/dnsx.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/feroxbuster.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/ffuf.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/fping.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/gau.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/gf.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/gitleaks.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/gospider.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/grype.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/h8mail.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/httpx.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/katana.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/maigret.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/mapcidr.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/msfconsole.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/naabu.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/nmap.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/nuclei.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/searchsploit.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/subfinder.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/testssl.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/trivy.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/wafw00f.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/wpprobe.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tasks/wpscan.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/template.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/thread.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/tree.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/utils.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/utils_test.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/secator/workflows/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/fixtures/h8mail_breach.txt +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/fixtures/ls.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/fixtures/msfconsole_input.rc +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/fixtures/nmap_output.xml +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/all.yaml +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/inputs.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/outputs.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/setup.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/teardown.sh +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_addons.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_celery.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_scans.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_tasks.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_tasks_categories.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_worker.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/test_workflows.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/wordlist.txt +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/wordlist_dns.txt +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/wordpress_toolbox/Dockerfile +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/integration/wordpress_toolbox/Makefile +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/performance/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/performance/loadtester.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/performance/test_worker.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/template/test_templates.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/__init__.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_celery.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_cli.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_command.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_config.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_offline.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_runners.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_runners_helpers.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_scans.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_serializers.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_tasks.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_tasks_categories.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_template.py +0 -0
- {secator-0.16.3 → secator-0.16.4}/tests/unit/test_utils.py +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.16.4](https://github.com/freelabz/secator/compare/v0.16.3...v0.16.4) (2025-06-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **dalfox:** reduce chunk size for dalfox ([#700](https://github.com/freelabz/secator/issues/700)) ([c14be68](https://github.com/freelabz/secator/commit/c14be68427d18072cf75c61fb6ae966f97515d15))
|
|
9
|
+
* **gcs:** add stored_response_path to sent items ([#697](https://github.com/freelabz/secator/issues/697)) ([7c6f992](https://github.com/freelabz/secator/commit/7c6f992b6c7898e956436e169b64af1d9f1d8934))
|
|
10
|
+
* mongodb optimizations ([#699](https://github.com/freelabz/secator/issues/699)) ([c0497a6](https://github.com/freelabz/secator/commit/c0497a67c293680dafdc052eff510ffd17edafe6))
|
|
11
|
+
|
|
3
12
|
## [0.16.3](https://github.com/freelabz/secator/compare/v0.16.2...v0.16.3) (2025-06-11)
|
|
4
13
|
|
|
5
14
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
steps:
|
|
2
2
|
- name: 'gcr.io/cloud-builders/docker'
|
|
3
3
|
entrypoint: 'bash'
|
|
4
|
-
args: ['-c', 'docker pull ${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator
|
|
4
|
+
args: ['-c', 'docker pull ${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator:${_VERSION} || exit 0']
|
|
5
5
|
- name: 'gcr.io/cloud-builders/docker'
|
|
6
|
-
args: ['build', '-t', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator', '--cache-from', '
|
|
6
|
+
args: ['build', '-t', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator:${_VERSION}', '--cache-from', '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator:${_VERSION}', '.']
|
|
7
7
|
substitutions:
|
|
8
8
|
_REPOSITORY: secator
|
|
9
9
|
_LOCATION: europe-west1
|
|
10
|
+
_VERSION: latest
|
|
10
11
|
|
|
11
12
|
images:
|
|
12
|
-
- '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator'
|
|
13
|
+
- '${_LOCATION}-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/secator:${_VERSION}'
|
|
@@ -214,11 +214,21 @@ def run_command(self, results, name, targets, opts={}):
|
|
|
214
214
|
update_state(self, task)
|
|
215
215
|
update_state(self, task, force=True)
|
|
216
216
|
|
|
217
|
+
if CONFIG.addons.mongodb.enabled:
|
|
218
|
+
return [r._uuid for r in task.results]
|
|
217
219
|
return task.results
|
|
218
220
|
|
|
219
221
|
|
|
220
222
|
@app.task
|
|
221
223
|
def forward_results(results):
|
|
224
|
+
"""Forward results to the next task (bridge task).
|
|
225
|
+
|
|
226
|
+
Args:
|
|
227
|
+
results (list): Results to forward.
|
|
228
|
+
|
|
229
|
+
Returns:
|
|
230
|
+
list: List of uuids.
|
|
231
|
+
"""
|
|
222
232
|
if isinstance(results, list):
|
|
223
233
|
for ix, item in enumerate(results):
|
|
224
234
|
if isinstance(item, dict) and 'results' in item:
|
|
@@ -227,10 +237,15 @@ def forward_results(results):
|
|
|
227
237
|
results = results['results']
|
|
228
238
|
|
|
229
239
|
if IN_CELERY_WORKER_PROCESS:
|
|
230
|
-
console.print(Info(message=f'
|
|
240
|
+
console.print(Info(message=f'Deduplicating {len(results)} results'))
|
|
231
241
|
|
|
232
242
|
results = flatten(results)
|
|
233
|
-
|
|
243
|
+
if CONFIG.addons.mongodb.enabled:
|
|
244
|
+
uuids = [r._uuid for r in results if hasattr(r, '_uuid')]
|
|
245
|
+
uuids.extend([r for r in results if isinstance(r, str)])
|
|
246
|
+
results = list(set(uuids))
|
|
247
|
+
else:
|
|
248
|
+
results = deduplicate(results, attr='_uuid')
|
|
234
249
|
|
|
235
250
|
if IN_CELERY_WORKER_PROCESS:
|
|
236
251
|
console.print(Info(message=f'Forwarded {len(results)} flattened and deduplicated results'))
|
|
@@ -254,8 +269,13 @@ def mark_runner_started(results, runner, enable_hooks=True):
|
|
|
254
269
|
console.print(Info(message=f'Runner {runner.unique_name} has started, running mark_started'))
|
|
255
270
|
debug(f'Runner {runner.unique_name} has started, running mark_started', sub='celery')
|
|
256
271
|
if results:
|
|
257
|
-
|
|
272
|
+
results = forward_results(results)
|
|
258
273
|
runner.enable_hooks = enable_hooks
|
|
274
|
+
if CONFIG.addons.mongodb.enabled:
|
|
275
|
+
from secator.hooks.mongodb import get_results
|
|
276
|
+
results = get_results(results)
|
|
277
|
+
for item in results:
|
|
278
|
+
runner.add_result(item, print=False)
|
|
259
279
|
runner.mark_started()
|
|
260
280
|
return runner.results
|
|
261
281
|
|
|
@@ -277,6 +297,9 @@ def mark_runner_completed(results, runner, enable_hooks=True):
|
|
|
277
297
|
debug(f'Runner {runner.unique_name} has finished, running mark_completed', sub='celery')
|
|
278
298
|
results = forward_results(results)
|
|
279
299
|
runner.enable_hooks = enable_hooks
|
|
300
|
+
if CONFIG.addons.mongodb.enabled:
|
|
301
|
+
from secator.hooks.mongodb import get_results
|
|
302
|
+
results = get_results(results)
|
|
280
303
|
for item in results:
|
|
281
304
|
runner.add_result(item, print=False)
|
|
282
305
|
runner.mark_completed()
|
|
@@ -46,6 +46,28 @@ def get_runner_dbg(runner):
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
def get_results(uuids):
|
|
50
|
+
"""Get results from MongoDB based on a list of uuids.
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
uuids (list[str | Output]): List of uuids, but can also be a mix of uuids and output types.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Generator of findings.
|
|
57
|
+
"""
|
|
58
|
+
client = get_mongodb_client()
|
|
59
|
+
db = client.main
|
|
60
|
+
del_uuids = []
|
|
61
|
+
for r in uuids:
|
|
62
|
+
if isinstance(r, tuple(OUTPUT_TYPES)):
|
|
63
|
+
yield r
|
|
64
|
+
del_uuids.append(r)
|
|
65
|
+
uuids = [ObjectId(u) for u in uuids if u not in del_uuids and ObjectId.is_valid(u)]
|
|
66
|
+
for r in db.findings.find({'_id': {'$in': uuids}}):
|
|
67
|
+
finding = load_finding(r)
|
|
68
|
+
yield finding
|
|
69
|
+
|
|
70
|
+
|
|
49
71
|
def update_runner(self):
|
|
50
72
|
client = get_mongodb_client()
|
|
51
73
|
db = client.main
|
|
@@ -178,6 +178,10 @@ class Runner:
|
|
|
178
178
|
|
|
179
179
|
# Add prior results to runner results
|
|
180
180
|
self.debug(f'adding {len(results)} prior results to runner', sub='init')
|
|
181
|
+
if CONFIG.addons.mongodb.enabled:
|
|
182
|
+
self.debug('adding prior results from MongoDB', sub='init')
|
|
183
|
+
from secator.hooks.mongodb import get_results
|
|
184
|
+
results = get_results(results)
|
|
181
185
|
for result in results:
|
|
182
186
|
self.add_result(result, print=False, output=False, hooks=False, queue=not self.has_parent)
|
|
183
187
|
|
|
@@ -189,8 +193,8 @@ class Runner:
|
|
|
189
193
|
for target in targets:
|
|
190
194
|
self.add_result(target, print=False, output=False)
|
|
191
195
|
|
|
192
|
-
# Run extractors on results
|
|
193
|
-
self._run_extractors(
|
|
196
|
+
# Run extractors on results
|
|
197
|
+
self._run_extractors()
|
|
194
198
|
self.debug(f'inputs ({len(self.inputs)})', obj=self.inputs, sub='init')
|
|
195
199
|
self.debug(f'run opts ({len(self.resolved_opts)})', obj=self.resolved_opts, sub='init')
|
|
196
200
|
self.debug(f'print opts ({len(self.resolved_print_opts)})', obj=self.resolved_print_opts, sub='init')
|
|
@@ -430,12 +434,12 @@ class Runner:
|
|
|
430
434
|
if error:
|
|
431
435
|
self.add_result(error)
|
|
432
436
|
|
|
433
|
-
def _run_extractors(self
|
|
437
|
+
def _run_extractors(self):
|
|
434
438
|
"""Run extractors on results and targets."""
|
|
435
439
|
self.debug('running extractors', sub='init')
|
|
436
440
|
ctx = {'opts': DotMap(self.run_opts), 'targets': self.inputs, 'ancestor_id': self.ancestor_id}
|
|
437
441
|
inputs, run_opts, errors = run_extractors(
|
|
438
|
-
results,
|
|
442
|
+
self.results,
|
|
439
443
|
self.run_opts,
|
|
440
444
|
self.inputs,
|
|
441
445
|
ctx=ctx,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|