Skip to content

Successful 200 NONE_NONE records produce false firewall blocked-domain warnings #63221

Description

@theletterf

An Elastic Docs review exposed a recurring firewall warning for api.anthropic.com, even though the workflow already allowed the domain and the Claude requests completed successfully. The warning is visible in elastic/docs-content#8527 and came from run 36030637134.

What I found

The reusable Docs review workflow already includes api.anthropic.com in network.allowed. The run artifact also shows it in the effective firewall policy.

For each successful Claude CONNECT request, the Squid access log contains this pair:

... api.anthropic.com:443 ... CONNECT 200 NONE_NONE:HIER_NONE ...
... api.anthropic.com:443 ... CONNECT 200 TCP_TUNNEL:HIER_DIRECT ...

The firewall summary parser checks successful status codes before it checks the decision field. It therefore classifies both records as allowed.

The blocked-domain footer parser checks NONE_NONE before it checks successful status codes. It therefore classifies the first record as blocked and appends an incorrect allowlist recommendation to the generated review.

Expected behavior

A record with status 200, 206, or 304 must not produce a blocked-domain warning, including when the decision field is NONE_NONE.

Real blocks must continue to be reported:

  • Status 403 or 407.
  • Status 0 with NONE_NONE.
  • TCP_DENIED without a successful status.

Proposed fix

Give successful status codes priority in isRequestBlocked, matching isRequestAllowed in the summary parser. Add a direct unit test and a log-level regression test for the observed two-record api.anthropic.com sequence.

I prepared a reference patch with that change and a patch changeset. Its focused test file passes all 37 tests. JavaScript formatting also passes. No live sandbox test was run. The complete local make agent-finish check stopped in the Go linter because the local Go 1.25 toolchain cannot process repository code that requires Go 1.27.

Related issue #58014 included the same false api.anthropic.com warning, but it covered broader audit problems and expired without isolating this parser-order defect.

The next step is to apply the focused parser change upstream and run the full repository CI suite.

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions