Skip to content

Bound attack queue capacity and validate configuration at startup (fixes #6) - #15

Open
KingUdo wants to merge 6 commits into
mainfrom
issue-6-bound-queue-and-validate-auth
Open

KingUdo wants to merge 6 commits into
mainfrom
issue-6-bound-queue-and-validate-auth

Conversation

@KingUdo

@KingUdo KingUdo commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Bounded the module attack_queue with maxsize=MAX_QUEUE_SIZE (default 10000, configurable via environment variable).
  • Updated submit_attack() to handle full queue conditions without blocking or crashing, logging a warning and dropping excess payloads to prevent memory exhaustion (OOM).
  • Added validate_configuration() executed at startup to warn operators if NETWATCH_COLLECTOR_AUTHORIZATION is missing or SENSOR_UUID is set to the default placeholder.
  • Added unit tests in src/test_additional.py for full-queue handling and startup configuration validation.
  • Fixes Unbounded memory growth via attack_queue and missing API authorization validation #6.

Test Results

============================== 24 passed in 3.17s ==============================

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.

Unbounded memory growth via attack_queue and missing API authorization validation

1 participant