Skip to content

Add extended outbound HTTP debugging - #924

Merged
adulau merged 2 commits into
mainfrom
feat/extended-http-debug
Oct 14, 2026
Merged

adulau merged 2 commits into
mainfrom
feat/extended-http-debug

Conversation

@adulau

@adulau adulau commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The server's existing debug logs show module queries but do not show the HTTP exchanges between modules and their services. Add --debug-extended to enable normal debugging plus outbound HTTP request and response tracing:

misp-modules --debug-extended

Log methods, URLs, headers, status codes, and untruncated bodies, with a unique exchange ID and the module name for concurrent queries. Trace streamed uploads and responses as they are sent or read, preserving lazy reads, binary data, compression, redirects, and exception behavior. Add usage and coverage details to the README and installation documentation.

Preserve buffer-protocol upload bodies such as arrays, passing the original object to the HTTP adapter and logging its bytes. Log the contents of streamed buffer chunks as well. WhoisFreaks copies the current context into each parallel domain and IP lookup so nested worker requests retain their module attribution.

Coverage includes requests and SDKs using its standard HTTP adapter. Other HTTP clients and adapters that replace HTTPAdapter.send are not covered; unread streamed response data is not logged. Custom modules starting their own worker threads must propagate the current Python context to retain module attribution. Extended mode deliberately includes credentials and sensitive payloads without redaction, with a startup warning and documentation explaining this behavior. HTTP tracing stays disabled for normal --debug.

Validation:

  • All 26 focused tests passed, covering complete exchanges, redirects, error responses, compression, binary data, lazy streaming, uploads (including buffer-protocol bodies and streamed buffer chunks), connection failures, concurrent module attribution, both module handler interfaces, WhoisFreaks nested domain/IP workers, and CLI/logger settings.
  • Actual server startup succeeded with --test --debug-extended --port 0.
  • Black, isort, flake8, and whitespace checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T10:21:09.705696Z 1561a8c PR opened
🔒 Security Review ✅ Completed 2026-10-13T10:26:28.695484Z 1561a8c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1561a8cddf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread misp_modules/http_debug.py Outdated
Comment thread misp_modules/__main__.py
@adulau
adulau merged commit 4b5ba76 into main Oct 14, 2026
7 checks passed
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.

1 participant