Repository navigation
Rebuild dark-mcp on AIL Framework - #1
Merged
Merged
Conversation
Contributor License AgreementAll contributors have CLA coverage or an explicit repository exemption. Explicitly exempt from the CLA (not signed): |
…ate source lineage
| records = await asyncio.get_running_loop().getaddrinfo(host, 443, type=socket.SOCK_STREAM) | ||
| addresses = list(dict.fromkeys(row[4][0] for row in records)) | ||
| if not addresses or any( | ||
| not ipaddress.ip_address(ip).is_global or ipaddress.ip_address(ip).is_multicast for ip in addresses |
There was a problem hiding this comment.
P2: Forum DNS validation accepts NAT64 IPv6 addresses and can route HTTPS requests to internal IPv4
NAT64 IPv6 (64:ff9b::/96) passes is_global, so a forum AAAA record can route the server to internal IPv4.
Reject is_reserved and transition prefixes (64:ff9b::/96, 6to4, IPv4-mapped) before connecting; add NAT64 tests.
AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.
<file name="src/dark_mcp/forums.py">
<violation number="1" location="src/dark_mcp/forums.py:180">
<priority>P2</priority>
<title>Forum DNS validation accepts NAT64 IPv6 addresses and can route HTTPS requests to internal IPv4</title>
<evidence>public_addresses() rejects only addresses for which `not ipaddress.ip_address(ip).is_global or ...is_multicast` is true. Python's `is_global` classifies the NAT64 well-known prefix `64:ff9b::/96` as globally routable (confirmed across supported Python versions), even though it is reserved and encodes an IPv4 destination. For example, `64:ff9b::7f00:1` encodes 127.0.0.1 and `64:ff9b::a9fe:a9fe` encodes 169.254.169.254. A compromised or attacker-controlled allowlisted forum can return such an AAAA record; `_request` then pins that address and performs an HTTPS GET with the forum Host/SNI. This defeats the private-address guard. TLS hostname verification still limits full response retrieval unless the internal endpoint presents a trusted certificate for the requested forum host, so treat this as an internal-reachability/blind-SSRF bypass, not guaranteed metadata disclosure.</evidence>
<recommendation>Reject `is_reserved` in addition to non-global/multicast addresses, and explicitly deny IPv4-embedded IPv6 transition prefixes such as `::ffff:0:0/96`, `64:ff9b::/96`, `64:ff9b:1::/48`, `2002::/16`, and `2001::/32` before connecting. Add regression tests for NAT64/6to4/IPv4-mapped answers and an egress firewall rule blocking private and link-local destinations.</recommendation>
</violation>
</file>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuild dark-mcp as an MCP interface to AIL Framework. Collection, retained objects, processing and full-text search now run through genuine AIL workers, Lacus/Tor and Meilisearch. The old custom collectors, catalog and evidence database are removed from the active implementation. Version 1.0.0 is a breaking tool/configuration change with a fresh corpus.
Add a pinned local deployment and authenticated compatibility routes calling AIL's existing search/object libraries. Ten bounded MCP tools cover explicit page collection, retained capture history, keyword search, original objects, ingested chats and labelled operator submissions. Monitoring and alert delivery remain outside scope.
Document an agent-driven workflow for broad and deep research: inventory actual source coverage, expand entity/intent queries, discover original threads, collect within budgets, reconcile asynchronous captures, inspect original content, pivot on substantiated leads and report provenance and access gaps. Add root AGENTS.md with repository architecture, development checks, research instructions and private-data handling.
Validation:
Live testing exposed an experimental substring false negative, so that mode is excluded. Native keyword search has typo/prefix tolerance and requires original-content checks. Temporary task removal is not a success receipt: retained URLs, collection times and bodies must be reconciled, including late captures on shared hostnames. Ordinary non-crawled operator imports are stored but excluded from upstream full-text indexing.
See README.md, AGENTS.md, docs/research-playbook.md, docs/architecture.md, docs/validation-2026-10-20.md and docs/expanded-validation-2026-10-20.md. Raw source bodies, credentials, sessions and local protocol receipts are not committed. Public page access is demonstrated; native Telegram ingestion, authenticated forums and OCR require separate configuration. The evidence does not establish detection before compromise/disclosure or commercial coverage parity.