Skip to content

Add default domain suffix database path#2705

Open
BharatDeva wants to merge 1 commit into
certtools:developfrom
BharatDeva:fix/domain-suffix-default-file
Open

Add default domain suffix database path#2705
BharatDeva wants to merge 1 commit into
certtools:developfrom
BharatDeva:fix/domain-suffix-default-file

Conversation

@BharatDeva
Copy link
Copy Markdown

Fixes #2688

Description

DomainSuffixExpertBot did not define a default suffix_file, so the bot and its --update-database path depended on every runtime configuration providing that parameter explicitly.

This change adds a stable default under IntelMQ's state directory and lets update_database() use that default when a domain suffix bot is configured without a suffix_file parameter. Existing configured paths still take precedence.

Tests

I ran the focused regression test and the domain suffix test module under WSL:

PYTHONWARNINGS=ignore::PendingDeprecationWarning /home/codexuser/codex-work/intelmq/.venv/bin/python -m unittest intelmq.tests.bots.experts.domain_suffix.test_expert.TestDomainSuffixDatabaseUpdate.test_update_database_uses_default_suffix_file
# Ran 1 test in 0.003s
# OK
PYTHONWARNINGS=ignore::PendingDeprecationWarning /home/codexuser/codex-work/intelmq/.venv/bin/python -m unittest intelmq.tests.bots.experts.domain_suffix.test_expert
# Ran 7 tests in 0.108s
# OK
/home/codexuser/codex-work/intelmq/.venv/bin/python -m flake8 intelmq/bots/experts/domain_suffix/expert.py intelmq/tests/bots/experts/domain_suffix/test_expert.py
# no output
git diff --check
# clean

DomainSuffixExpertBot had no default suffix_file even though its update-database command can create and refresh the public suffix list file.

Use a stable state-file path by default and let update_database fall back to it when runtime parameters omit suffix_file. Add a regression test covering that default update path.

Signed-off-by: BharatDeva <278575558+BharatDeva@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domain suffix expert: Missing default value for database file

1 participant