Skip to content

v3.40.3: MCP Attack Surface fix and parity tests, IP and Domain cache versions, lxml 6.2.0

Latest

Choose a tag to compare

@osintph osintph released this 29 Nov 10:04

The MCP Attack Surface tool works again and can no longer get around ownership
verification, every MCP tool is now tested against its web endpoint, the IP
Reputation and Domain Intel caches can no longer serve results from older code,
and lxml moves to 6.2.0, which closes the last open Dependabot alert.

What you must do on upgrade

  • Nothing. sudo /opt/falconeye/app_src/scripts/upgrade.sh v3.40.3
    reinstalls both venvs (requirements.txt changed) and restarts the service. No
    cache flush is needed: cached IP and Domain results from 3.40.2 are never served
    again and the 15-minute sweep deletes them.
  • If you use the asm_discover MCP tool for operator scans, it now needs the
    operator key and the current TOTP code with each call (operator_key,
    operator_code, plus engagement_reference). ASM_MCP_OPERATOR=true alone no
    longer authorizes anything. If ASM_OPERATOR_ALLOWED_CIDRS is set, add
    127.0.0.1/32 to it: MCP calls arrive from there. A domain its owner verified
    in the Attack Surface tab needs neither.
  • An MCP client attached during the upgrade loses its server process when the
    MCP venv is reinstalled. Reconnect it (/mcp in Claude Code, or restart Claude
    Desktop).

New packages

  • No apt package and no systemd unit is added.
  • pip: lxml 5.2.1 to 6.2.0 (GHSA-vfmq-68hx-4jfw, fixed in 6.1.0; 6.2.0 also
    carries the three lxml advisories published with it on 2026-11-27).
    beautifulsoup4 stays at 4.12.3.

Changed

  1. asm_discover returns the scan. From v3.38.0 to v3.40.2 the MCP tool
    returned no hosts and no findings for every domain: its route read the durable
    asm_hosts and asm_findings tables, which the one-time pipeline stopped
    writing in v3.38.0. It now runs the run through the tab's job runner (same slot
    claim and timeout) and returns the tab's own result view, read from the
    one-time result cache, so the MCP result and the web result are the same.
  2. asm_discover sits behind the tab's gate. Before, ASM_MCP_OPERATOR=true
    made every MCP call operator context for any domain. Now a run needs either a
    live grant for the domain, from the owner's DNS TXT or role-email verification
    in the tab (a DNS grant is re-checked first, as for a web scan), or
    operator_key and operator_code, checked by the unlock route's code: key
    hash, TOTP window, ASM_OPERATOR_ALLOWED_CIDRS, failure lockout, audit row and
    notice email, plus an engagement reference and the operator daily cap.
    Anything else is refused with needs_verification. Blocked domains are
    refused on both paths.
  3. MCP errors carry their message. The MCP server read only FastAPI's
    detail, so every route answering {"error": ...} (Attack Surface, Hunt,
    Counterparty and others) reached the client as "request rejected". It now
    passes the route's own error and message.
  4. MCP parity tests. tests/unit/test_mcp_parity.py runs all 11 tools and
    their web endpoints, driven as the browser drives them, against the same
    recorded or stubbed inputs (closed network: mock HTTP, fixed DNS, fake LLM, the
    recorded Counterparty fixture) and fails if the results differ or a tool has
    no test, plus seven gate tests for asm_discover. Only per-run identity, clock
    and per-caller quota fields are excluded from the comparison. No other tool
    was returning stale, empty or different results.
  5. IP Reputation and Domain Intel logic versions. IP_INTEL_LOGIC_VERSION and
    DOMAIN_INTEL_LOGIC_VERSION (app/logic_versions.py, both 1) prefix the cache
    keys (v1|<ip>, v1|<domain>), so a row written by other code is never served.
    The 15-minute sweep deletes rows past the 6-hour TTL and rows of any other
    version (on the first sweep after this upgrade, every 3.40.2 row).
    tests/unit/test_cache_logic_versions.py fails when the files behind either
    result change without a bump; python -m tests.unit.test_cache_logic_versions --refresh records the new hash. The rule is in the README, the runbook and
    CONTRIBUTING.
  6. lxml 6.2.0. FalconEye uses lxml only as BeautifulSoup's parser in the
    Telegram public-page scrape (app/telegram/tier1_scrape.py); Email Header uses
    the standard library's html.parser and the other tabs parse HTML with
    regular expressions. The 6.x changes that touch that path are none: it uses
    BeautifulSoup(html, "lxml") and CSS selectors only, not iterparse,
    xmlfile, SAX, lxml.html.diff, Schematron or URL parsing. The five
    Telegram fixtures parse identically under 5.2.1 and 6.2.0.
  7. docs/mcp.md gives the remote registration with one key
    (-o IdentitiesOnly=yes -i) and, for the public instance, the tailnet address
    and port; SSH on vps-e7d7933f is reachable over the tailnet only. MCP calls
    share the 127.0.0.1 rate-limit bucket (the docs said "unknown").