Skip to content

fix(security): cloudflare radar lookups use the documented radar api with the configured token, and a failed lookup is reported as unavailable, never as verified #1429

Closed

Description

@dan-petty

Problem

Checked at release/v0.2.29 (05e9388).

  • Undocumented endpoint. CloudflareRadarClient sends GET https://radar.cloudflare.com/api/v1/intel/domain/{target} with no credentials (security/vulnerability_lookup.py:368, :459). Cloudflare documents the Radar API at https://api.cloudflare.com/client/v4/radar/ and requires an API token (developers.cloudflare.com/radar/get-started/first-request/). The path in use is not part of that API.
  • A failed lookup reads as a clean one.
    • Any status other than 200 sets the summary "Domain verified in public DNS registry" (:469), and any exception sets "Verified domain reference" (:478).
    • The agent's threat-intel tool hands that text to the model as the "Reputation Summary" (ai/tools/builtin_tools.py:473-479), and the review marks the host "✓ Safe / Low Risk" (ai/review/pipeline.py:2973-2976).
    • So a 403, a 429, a 5xx or a network failure reads as a verified, safe domain. The evidence-first review direction has tools originate findings, and AGENTS.md forbids synthetic assessments.
  • Client. It is a raw httpx2.Client (:377); moving it onto the egress-checked factory is fix(security): move the remaining HTTP clients onto the egress-checked factory and delete the pre-flight resolve paths #1381's work. The cloudflare SDK (Cloudflare; 5.9.0, released 2026-10-03) is built on httpx, not httpx2, so it cannot take the egress-checked client.

Proposed remedy

Key questions

  • Which documented Radar endpoint gives a domain's categories? (proposed) Pick it from Cloudflare's Radar API reference. If no documented endpoint gives categories, remove the Radar lookup instead of keeping an undocumented one.

Acceptance criteria

  • The recorded request goes to https://api.cloudflare.com/client/v4/radar/... with Authorization: Bearer <token>. The test fails on the current code. Reserved names such as example.com are skipped before any request (fix(security): skip cloudflare radar threat intel lookups for local and reserved domains #648), so the test looks up a non-reserved name and says why.
  • Replies of 403, 429 and 500, and a connect error, each give outcome failed or unavailable and no "verified" or "Safe" text in the tool output or the review's network section. These tests fail on the current code.
  • With no token configured, no request is recorded and the outcome is unavailable.
  • rg -n 'radar.cloudflare.com/api|Verified domain reference|verified in public DNS' src prints nothing.
  • Tests run offline, with fakes only at the HTTP edge (an httpx2 MockTransport, through tests/llm_stream_fakes.route_client or refactor(cli): Unify HTTP and DNS seams with shared fakes #1314's fixture) or the process edge. No test patches a devops_cli name.
  • Each new or changed test runs in under 1 s.
  • uv run devops ci passes.

Related: #1146, #708, #648, #1137, #1381

Found by the 2026-10-08 client-library audit.

Opened as a borrow (#1153, budget/borrowed): the agent filing quota is spent for this cycle, and this is a defect or security finding of the owner-requested 2026-10-08 client-library audit.

Activity

  1. added
    type/bug
    scope/security
    scope/review
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P1-High. A security tool that reports 403/429/5xx/network failures as 'verified safe' undermines the entire review pipeline's trust and could mask real threats.
    • Value: High. Users rely on the review's 'Safe / Low Risk' verdict to make security decisions; a false 'safe' from a failed lookup is directly harmful.
    • Effort: Medium. Requires switching to the documented Radar API with token auth, adding ok/unavailable/failed outcome handling, updating the threat-intel tool and review pipeline, and writing offline tests across several files.
  3. added a commit that references this issue on Oct 26, 2026
    c52af09
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

    scope/reviewscope/securitysource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions