runPayload (src/actions/runs.ts) puts costUsd, turns, and for a cluster job placement and node, on every run.queued / run.started / run.finished event. GET /api/v1/repos/:owner/:name/events returns the outbox through audienceFilter (src/core/event_audience.ts), which drops whole events but does not redact payloads, so a stranger reading a public repository's events gets each run's cost and node. Every other door now reads runs through runForReader.
To do: redact the run.* payload for a reader who fails canSeeOwnerFacts on every surface that serves outbox events to people (the events API, and any live feed or SSE that forwards them), with the same rule as runForReader. Add a test that a stranger's events for a public repository carry no cost, turns or node, and that the owner's do. Webhooks go to the repository's admins and keep the full payload.
Found while addressing review on #2952 (#2917).
runPayload(src/actions/runs.ts) putscostUsd,turns, and for a cluster jobplacementandnode, on everyrun.queued/run.started/run.finishedevent.GET /api/v1/repos/:owner/:name/eventsreturns the outbox throughaudienceFilter(src/core/event_audience.ts), which drops whole events but does not redact payloads, so a stranger reading a public repository's events gets each run's cost and node. Every other door now reads runs throughrunForReader.To do: redact the
run.*payload for a reader who failscanSeeOwnerFactson every surface that serves outbox events to people (the events API, and any live feed or SSE that forwards them), with the same rule asrunForReader. Add a test that a stranger's events for a public repository carry no cost, turns or node, and that the owner's do. Webhooks go to the repository's admins and keep the full payload.