Skip to content

BUG: Several bots have bad hardcoded default parameters #2347

@gethvi

Description

@gethvi

1. File Output bot:

parameter file default is hardcoded to /opt/intelmq/var/lib/bots/file-output/events.txt (doesnt respect INTELMQ_PATHS_NO_OPT)

should be something like: VAR_STATE_PATH / {BOT-ID} / events.txt

2. Files Output bot:

tmp: str = "/opt/intelmq/var/lib/bots/files-output/tmp"
dir: str = "/opt/intelmq/var/lib/bots/files-output/incoming"

(doesnt respect INTELMQ_PATHS_NO_OPT and BOT ID)

This issue is Work In Progress, there might be more.

3. SQLOutput + SQLMixin + Bot class

SQLOutput has jsondict_as_string boolean parameter with default value True.

jsondict_as_string = True

SQLMixin has message_jsondict_as_string boolean parameter with default value True.

# overwrite the default value from the OutputBot
message_jsondict_as_string = True

Bot class sets jsondict_as_string based on message_jsondict_as_string and defaults to False.

self.jsondict_as_string: bool = getattr(self, "message_jsondict_as_string", False)

This is very messy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIndicates a good issue for first-time contributorshelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions