Skip to content

[pull] master from kevoreilly:master#455

Merged
pull[bot] merged 9 commits intothreatcode:masterfrom
kevoreilly:master
Apr 20, 2026
Merged

[pull] master from kevoreilly:master#455
pull[bot] merged 9 commits intothreatcode:masterfrom
kevoreilly:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 20, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

doomedraven and others added 9 commits April 20, 2026 15:24
* Optimize task deletion queries in mongo_hooks.py

Refactor mongo_hooks.py to improve performance of task deletion.

* Refactor mongo_update_one and improve delete calls

Refactor mongo_update_one to use 'update' parameter and update delete calls functionality.

* Refine mongo_update_many query for task_ids
* Refactor allowed functions to a dictionary for safety

* Update views.py
* Add path traversal check for file uploads

* Update web/apiv2/views.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* mongodb calls fixes

* Update modules/processing/CAPE.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modules/processing/CAPE.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modules/processing/network.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* mongodb calls fixes

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Add public_red option and enforce TLP search rules

Add a new public_red option to default web config and update perform_search to respect TLP/public_searches settings for non-privileged users. Construct user-specific filters for Elasticsearch and MongoDB searches so RED TLP tasks are hidden from other users unless public_red allows them (or the task belongs to the requesting user). Also adjust source field selection to respect an explicit projection and ensure the Mongo aggregation pipeline includes the same TLP/user_id filtering logic.

* fix

* Update web_utils.py
* Refactor file handling and imports for robustness

Refactored memory dump logic in analyzer.py to use context managers for safer file handling and replaced os.system with subprocess.run for setting the system date. Improved process status parsing in process.py for better error handling. Switched to importlib.import_module in packages.py for dynamic imports, enhancing code clarity and reliability.

* Apply suggestion from @gemini-code-assist[bot]

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…2952)

When pebble's ProcessPool recycles workers (max_tasks=7), replacement
workers are forked from the multi-threaded parent. The previous
init_worker() called handler.close(), log.removeHandler(), and
log.addHandler(), all of which acquire locks that may be inherited in
a deadlocked state. This was confirmed on production (10h freeze,
974 unprocessed tasks).

Replace with direct list operations (log.handlers.clear/append) that
bypass logging._lock. Skip handler.close() entirely — it triggers
fflush() which can deadlock on inherited C-level FILE* locks. After
fork the child is single-threaded so direct list manipulation is safe.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* some fixes

* some fixes

* Update modules/processing/CAPE.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update admin/admin.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* some fixes

* some fixes

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Bumps [fastmcp](https://github.com/PrefectHQ/fastmcp) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/PrefectHQ/fastmcp/releases)
- [Changelog](https://github.com/PrefectHQ/fastmcp/blob/main/docs/changelog.mdx)
- [Commits](PrefectHQ/fastmcp@v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: fastmcp
  dependency-version: 3.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Apr 20, 2026
@pull pull Bot added the ⤵️ pull label Apr 20, 2026
@pull pull Bot merged commit 31be997 into threatcode:master Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants