Skip to content

v3.40.2: cache logic versions, snapshot failures shown, Cloudflare ranges refresh, dnspython and pyasn1

Choose a tag to compare

@osintph osintph released this 29 Nov 09:14
· 1 commit to main since this release

Upgrading from 3.39.0 or 3.40.0 as root from an account that does not own the checkout? Run this once first:

sudo git config --global --add safe.directory /opt/falconeye/app_src

Counterparty results can no longer outlive the logic that produced them, a failed
archive snapshot is reported instead of read as "no evidence", RIPEstat gets one
retry, one Cloudflare range list feeds nginx and the app and refreshes itself,
and two dependencies with open advisories are upgraded.

What you must do on upgrade

  • Upgrading from 3.39.0 or 3.40.0 as root from an account that does not own
    /opt/falconeye/app_src
    (logged in as root, or sudo from another admin
    account)? Run this once first:

    sudo git config --global --add safe.directory /opt/falconeye/app_src

    Those versions' upgrade script does the checkout before handing over to the new
    one. sudo from the owning account (ubuntu by default) needs nothing, and
    from 3.40.1 the scripts handle it.

  • Otherwise nothing. sudo /opt/falconeye/app_src/scripts/upgrade.sh v3.40.2
    reinstalls both venvs (the requirements changed), installs and runs the
    Cloudflare range refresh, and restarts the service. No cache flush is needed.

  • Not behind Cloudflare, with your own ranges in
    /etc/nginx/snippets/cloudflare-origin-allow.conf?
    Set
    CLOUDFLARE_IPS_REFRESH=false in .env before upgrading, or the new daily
    refresh renders Cloudflare's ranges over yours.

  • If you hand-installed the refresh-cf-cidr cron (/etc/cron.d/refresh-cf-cidr
    writing /etc/nginx/cloudflare-cidrs.conf): when nothing in nginx includes
    that file, the upgrade moves the cron, its script and its output into
    /opt/falconeye/backups/retired-cf-cidr-<time>/.

New packages

  • No apt package is added.
  • pip: pyasn1 0.6.4 to 0.6.5 and dnspython 2.6.1 to 2.9.2 (below). dnspython
    2.9 needs Python 3.11 or later; Ubuntu 24.04 ships 3.12.
  • New systemd units: falconeye-cf-ips.service and .timer.

Changed

  1. Counterparty cache logic version. COUNTERPARTY_LOGIC_VERSION
    (app/counterparty/__init__.py, now 3) is part of the cache key, so a result
    cached by older logic is never served after an upgrade. The 15-minute sweep
    now deletes Counterparty results past COUNTERPARTY_CACHE_HOURS, including old
    rows. tests/counterparty/test_logic_version.py fails when a file under
    app/counterparty/ (or Hunt's detect_parked) changes without a bump, and
    python -m tests.counterparty.test_logic_version --refresh records the new
    hash. The rule is in the runbook and CONTRIBUTING.
  2. Snapshot fetch failures show. A Wayback snapshot that could not be fetched
    is marked on the Archive card, counts as a source that did not answer ("5 of 6
    sources responded (archive snapshot failed)"), and makes the title comparison
    "not run (snapshot fetch failed)" instead of "no evidence". When the snapshot
    that would show what preceded a re-registration fails, the verdict says so
    instead of guessing. tests/counterparty/test_snapshot_failures.py.
  3. RIPEstat retry. One retry after 1.5 s on a timeout, connection error,
    HTTP 429 or 5xx, sourceapp=falconeye on every call, and the exception type in
    the log. Checked against RIPEstat's documented rules (no request cap, 8
    concurrent requests per IP, registration above 1000 a day).
    tests/unit/test_ripestat_retry.py.
  4. Cloudflare ranges: one list. scripts/refresh_cloudflare_ips.py, run daily
    by falconeye-cf-ips.timer, fetches https://api.cloudflare.com/client/v4/ips,
    validates it, writes /opt/falconeye/data/cloudflare-ips.txt (which the app
    now reads for its trusted-proxy check) and renders the nginx origin allow list
    from the same list, with nginx -t before any reload. A failed, empty,
    malformed or much shorter download keeps the last good list and is logged.
    Installed by provision.sh, kept by upgrade.sh. Nothing touches a firewall,
    SSH or Cloudflare settings. tests/unit/test_cloudflare_refresh.py.
  5. Dependencies. pyasn1 0.6.5 fixes GHSA-mm57-4v3p-rchx,
    GHSA-2qm8-x737-gmw5, GHSA-9m75-vc3g-4x39 and GHSA-fm9c-5rcf-2q5p (linear-time
    decoding; no new rejections or exceptions; FalconEye's DER time-stamp tokens
    use no constructed strings). dnspython 2.9.2 fixes GHSA-45c3-73f7-pv4m
    (2.9.0, decompression chains limited to 16) and GHSA-vvf4-9x63-8xvv (2.9.2, WKS zone
    text). Nothing FalconEye calls changed: Resolver(), resolve(), lifetime and
    timeout, the resolver exceptions, reversename.from_address and MX/TXT text
    output are as before. lxml stays at 5.2.1: GHSA-vfmq-68hx-4jfw (XXE in iterparse
    and ETCompatXMLParser) is known and not reachable, because FalconEye only
    parses HTML through BeautifulSoup; it gets its own release.
  6. Case File. /api/case/verify-token (20 per minute per IP, unchanged) is
    now described in the privacy policy and docs/case-file.md.
  7. Docs. The upgrade note above is at the top of the runbook's upgrade
    appendix and in the README; the runbook's install audit lists the Cloudflare
    refresh as installed.