Skip to content

feat(weave): Allow a whitelisted set of private network IP addresses for remote scoring - #7707

Merged
mscavezze-cw merged 7 commits into
masterfrom
mike/remote_scorer_host_policy_100
Aug 7, 2026
Merged

feat(weave): Allow a whitelisted set of private network IP addresses for remote scoring#7707
mscavezze-cw merged 7 commits into
masterfrom
mike/remote_scorer_host_policy_100

Conversation

@mscavezze-cw

@mscavezze-cw mscavezze-cw commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Allow a whitelisted set of private network IP addresses for remote scoring. Specify using an env var containing comma-separated CIDR (eg 10.0.0.0/8).

Testing

Unit tests

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Adds WF_SCORING_WORKER_REMOTE_SCORER_ALLOWED_PRIVATE_CIDRS and its
accessor. Operators list networks that are exempt from the scoring
worker's non-routable address deny, so a deployment whose scorers sit on
an internal network can reach them without waiving https enforcement.

The accessor returns raw strings and never raises, matching every other
accessor in this module. The scoring worker parses and validates the
entries, rejecting malformed networks and any network overlapping the
ranges that can never be exempted.

Inert on its own: nothing reads the accessor until the worker change
lands.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mscavezze-cw
mscavezze-cw force-pushed the mike/remote_scorer_host_policy_100 branch from 0183298 to 480b3fc Compare August 7, 2026 22:21
mscavezze-cw and others added 2 commits August 7, 2026 15:23
Drop two paragraphs that belong at the enforcement point rather than on
the accessor: which entries the worker rejects, and what happens when a
broad network is combined with host validation disabled. Both are
documented where that logic lives.

Name wf_scoring_worker_remote_scorer_allow_insecure_http directly instead
of calling it "the insecure-http waiver".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
One test asserted five separate behaviors in sequence, so a regression in
the first one masked the rest. Split it so each names exactly what it
covers: the unset default, an empty value, comma splitting, whitespace
stripping, and skipping empty entries.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mscavezze-cw mscavezze-cw changed the title feat(weave): add remote scorer private-CIDR allowlist env accessor feat(weave): Allow a whitelisted set of private network IP addresses for remote scoring Aug 7, 2026
mscavezze-cw and others added 4 commits August 7, 2026 15:31
The five split tests differed only in the env value and the expected
list, so fold them into one parametrize table keyed on exactly those two
things. None encodes an absent variable, which is distinct from an empty
one.

Adds a single-network case, which the sequence of multi-entry cases never
covered on its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Keep each id next to the data it names instead of in a trailing ids list
that readers have to count positions against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tring

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mscavezze-cw
mscavezze-cw marked this pull request as ready for review August 7, 2026 22:41
@mscavezze-cw
mscavezze-cw requested a review from a team as a code owner August 7, 2026 22:41
@mscavezze-cw
mscavezze-cw enabled auto-merge (squash) August 7, 2026 22:54
@mscavezze-cw
mscavezze-cw merged commit c28011c into master Aug 7, 2026
108 checks passed
@mscavezze-cw
mscavezze-cw deleted the mike/remote_scorer_host_policy_100 branch August 7, 2026 22:59
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants