hard-fail on legacy module options dict; version preload cache - #3119
Merged
Conversation
Contributor
🚀 Performance Benchmark Report
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## preset-validation #3119 +/- ##
=================================================
+ Coverage 90% 90% +1%
=================================================
Files 451 451
Lines 39771 39806 +35
=================================================
+ Hits 35643 35675 +32
- Misses 4128 4131 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ausmaster
approved these changes
May 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repro before / after
A user module that uses the legacy pattern:
```python
class legacy_user_mod(BaseModule):
watched_events = ["DNS_NAME"]
options = {"my_api_key": "", "max_results": 100}
options_desc = {"my_api_key": "API key", "max_results": "Max results"}
```
Before: module loads with all option defaults silently dropped; setting them in YAML produces `[WARN] Could not find config option "modules.legacy_user_mod.my_api_key". Did you mean "modules.dehashed.api_key"?`
After:
```
[CRIT] Module "legacy_user_mod" (/path/legacy_user_mod.py:11) declares a legacy `options` dict, which is no longer supported in BBOT 3.0+.
Replace the `options` / `options_desc` dicts with a nested
`class Config(BaseModuleConfig)` schema. For example:
```
Tests
`test_legacy_options_dict_rejected` covers:
Follow-up (separate PR)
`docs/dev/module_howto.md` still shows the legacy `options = {...}` pattern at lines 26 and 123-138. That's part of a planned "3.0 Breaking Changes" docs section.