fix: implement P2 and P3 security, batching, and decoupling fixes #94

Merged
clanker merged 1 commit from pr/p2-p3-fixes into main 2026-10-15 04:59:17 +00:00
Member

Summary of fixes implemented:

  • SEC-6: Enforce 30s request timeouts and 50MB max body length on incoming daemon requests; use hmac.compare_digest for constant-time auth comparison; enforce 0600 file modes on generated rules, config, backups, and log files.
  • PERF-2: Protect part metadata cache with a threading.Lock and reload contacts on sync.
  • PERF-3: Add notmuch tag --batch support to notmuch runner and ned.service.modify_tags_batch; batch tag modifications in TypeSafeJevPlugin and cache API key discovery.
  • MAINT-2: Remove import-time settings monkeypatching across lazarus.util / compose_model and eliminate dynamic _get_collector hook in ned.actions.
  • PERF-5: Remove unused self.json_str serialization from SearchModel.refresh.
  • MAINT-3: Warn on customized daemon-only mail settings in desktop config.py.
Summary of fixes implemented: - SEC-6: Enforce 30s request timeouts and 50MB max body length on incoming daemon requests; use hmac.compare_digest for constant-time auth comparison; enforce 0600 file modes on generated rules, config, backups, and log files. - PERF-2: Protect part metadata cache with a threading.Lock and reload contacts on sync. - PERF-3: Add notmuch tag --batch support to notmuch runner and ned.service.modify_tags_batch; batch tag modifications in TypeSafeJevPlugin and cache API key discovery. - MAINT-2: Remove import-time settings monkeypatching across lazarus.util / compose_model and eliminate dynamic _get_collector hook in ned.actions. - PERF-5: Remove unused self.json_str serialization from SearchModel.refresh. - MAINT-3: Warn on customized daemon-only mail settings in desktop config.py.
- SEC-6: Add HTTP request timeouts (30s), 50MB body size cap, hmac.compare_digest token checks, and 0600 permissions on config/log files
- PERF-2: Thread-safe part cache access with threading.Lock and reload contacts on post-sync
- PERF-3: Implement notmuch tag --batch and service.modify_tags_batch; batch tag modifications in TypeSafeJevPlugin and cache API key lookup
- MAINT-2: Remove import-time settings monkeypatching from lazarus.util and lazarus.compose_model; remove dynamic _get_collector hook in ned.actions
- PERF-5: Drop dead json.dumps serialization in SearchModel.refresh
- MAINT-3: Emit non-fatal deprecation warnings when daemon-only settings are customized in desktop config.py
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Home/lazarus!94
No description provided.