Skip to content

feat(service): Redact the secrets that a run sends - #11

Merged
dcramer merged 1 commit into
mainfrom
feat/run-secrets
Oct 16, 2026
Merged

dcramer merged 1 commit into
mainfrom
feat/run-secrets

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

A run can now send secrets in its RunConfig. The service redacts them in each recording, together with the secrets of the service config and the credentials that it learns from request headers.

Before this change, only the service config could add secrets. A client could not add the credentials of its own CI job, so a value that a response shows but no request header has was written to the bucket. Recordings are public to read. Junior's local proxy used to redact AI_GATEWAY_API_KEY, SENTRY_EVALS_API_KEY, VERCEL_OIDC_TOKEN, and VERCEL_TOKEN this way. getsentry/junior#2156 lost that when it moved to the service.

  • The service keeps run secrets only in memory, for the run. It does not log them.
  • A run can send at most 32 secrets of at most 16 KiB each. Other values get HTTP 400.
  • Redaction now also matches the JSON-escaped form of each value. The recorder redacts the JSON text of a recording, so a value with " or \ did not match before.

This needs no Terraform change. It takes effect when the VM runs the new image.

pnpm check passes (on Node 22 in the sandbox).

via David Cramer.

--

View Junior Session [Sentry]

A run can now send secrets in its config. The service redacts them with
the secrets of the service config and keeps them only in memory. Clients
use this for the credentials of a CI job that a response can show but no
request header has.

Redaction also matches the JSON-escaped form of each value, because the
recorder redacts the JSON text of a recording.

Co-Authored-By: David Cramer <david@sentry.io>
sentry-junior Bot added a commit to getsentry/junior that referenced this pull request Oct 16, 2026
The local proxy redacted the values of AI_GATEWAY_API_KEY,
SENTRY_EVALS_API_KEY, VERCEL_OIDC_TOKEN, and VERCEL_TOKEN in every
recording. The service only knew credential headers, so a response that
showed one of these values was written to the public bucket. The run
config now sends them as secrets (getsentry/roach#11). A service without
that change ignores the field.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer merged commit 98e0ea0 into main Oct 16, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant