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

Retry deps failures in tests #1982

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bbot/core/helpers/depsinstaller/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def __init__(self, parent_helper):
self.minimal_git_config.touch()
os.environ["GIT_CONFIG_GLOBAL"] = str(self.minimal_git_config)

self.deps_behavior = self.parent_helper.config.get("deps_behavior", "abort_on_failure").lower()
self.deps_config = self.parent_helper.config.get("deps", {})
self.deps_behavior = self.deps_config.get("behavior", "abort_on_failure").lower()
self.ansible_debug = self.core.logger.log_level <= logging.DEBUG
self.venv = ""
if sys.prefix != sys.base_prefix:
Expand Down
15 changes: 7 additions & 8 deletions bbot/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ engine:
deps:
ffuf:
version: "2.1.0"
# How to handle installation of module dependencies
# Choices are:
# - abort_on_failure (default) - if a module dependency fails to install, abort the scan
# - retry_failed - try again to install failed dependencies
# - ignore_failed - run the scan regardless of what happens with dependency installation
# - disable - completely disable BBOT's dependency system (you are responsible for installing tools, pip packages, etc.)
behavior: abort_on_failure

### ADVANCED OPTIONS ###

Expand All @@ -129,14 +136,6 @@ dnsresolve: True
# Cloud provider tagging
cloudcheck: True

# How to handle installation of module dependencies
# Choices are:
# - abort_on_failure (default) - if a module dependency fails to install, abort the scan
# - retry_failed - try again to install failed dependencies
# - ignore_failed - run the scan regardless of what happens with dependency installation
# - disable - completely disable BBOT's dependency system (you are responsible for installing tools, pip packages, etc.)
deps_behavior: abort_on_failure

# Strip querystring from URLs by default
url_querystring_remove: True
# When query string is retained, by default collapse parameter values down to a single value per parameter
Expand Down
2 changes: 2 additions & 0 deletions bbot/test/test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ dns:
- example.com
- evilcorp.com
- one
deps:
behavior: retry_failed
engine:
debug: true
agent_url: ws://127.0.0.1:8765
Expand Down
Loading