Repository navigation
Conversation
`reliability.events` is a section extra, so an agent can push any JSON value there. `_reliability_categories` iterated `events or []`, which raises TypeError on a number or a bool and turned /api/fleet/overview into a 500 for the whole fleet. Read it through `_dicts` like every other list field in the module. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QcqxZRgcUbztpdtpBoWrt8
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Found by a crash-fuzzing run: telemetry snapshots built from the golden fixtures, with nested values mutated at random, fed through the server's pure telemetry consumers.
Problem.
reliability.eventsis a section extra (protocol.Sectionallows any JSON value), so a buggy or compromised agent can push5,3.7ortruethere.fleet_stats._reliability_categoriesiteratedevents or [], which raises:aggregate_overviewruns for the whole fleet, so one host with this payload makes/api/fleet/overviewreturn a 500 for every operator.Fix. Read the field through
health_rules._dicts, which every other list field infleet_statsalready uses. A non-list now counts as "no events", and non-dict entries are dropped as before.Related. #328 fixes the same input one step earlier on the same request, in
event_categories.annotate_snapshots. Once #328 merges, thisfleet_statscrash is the next one that request hits. The two PRs change different files, so they don't overlap.Added a regression test,
test_reliability_categories_ignores_events_that_are_not_a_list. It fails without the fix for float, int and bool inputs. No fuzz harness is committed.Checklist
pytest -q tests/test_fleet_stats.py(37 passed)ruff checkon the touched filesGenerated by Claude Code