Skip to content

fix(security): skip cloudflare radar threat intel lookups for local and reserved domains #648

Closed

Description

@dan-petty

Summary

OpenTelemetry trace spans for threat_intel.lookup.cloudflare reveal repeated blocked egress attempts and lookup errors when scanning codebases referencing local, internal, or test hostnames (e.g. localhost, hog.lan, node1.example.internal, host.minikube.internal).

Root Cause

In src/devops_cli/security/vulnerability_lookup.py, CloudflareRadarClient.check_domain and _partition_cached_domains only check is_example_or_invalid_domain(target). Unlike ShodanInternetDBClient.check_ip which inspects is_private_or_local_ip and is_example_or_reserved_ip, CloudflareRadarClient fails to check is_local_or_reserved_domain(target). Furthermore, is_example_or_invalid_domain explicitly returns False for localhost. As a result, internal hostnames and localhost are queried against the public Cloudflare Radar REST API endpoint, violating zero-trust egress safety and triggering blocked connection errors.

Remediation Plan

  1. In src/devops_cli/security/vulnerability_lookup.py, update check_domain and _partition_cached_domains to filter targets matching is_example_or_invalid_domain(target) or is_local_or_reserved_domain(target).
  2. Return a static NetworkReputationRecord for local/reserved domains without initiating network queries.
  3. Add unit test coverage in tests/test_vulnerability_lookup.py asserting that localhost, *.lan, *.local, *.internal, and *.test resolve offline without HTTP requests.

Activity

  1. added this to the v0.2.23 milestone on Sep 27, 2026
  2. added
    type/bug
    scope/security
    priority/p1-high
    on Sep 27, 2026
  3. dan-petty commented on Sep 28, 2026

    @dan-petty
    OwnerAuthor

    Closed by #649, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/securitytype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions