chore: capture all the envelopes - #2812
Conversation
d1a59a6 to
83d5600
Compare
| @@ -467,7 +384,7 @@ jobs: | |||
| needs: [test-build-windows, create-unity-matrix] | |||
| secrets: | |||
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |||
| SENTRY_TEST_DSN: ${{ secrets.SENTRY_TEST_DSN }} | |||
| SENTRY_TEST_DSN: http://capture@127.0.0.1:8787/1 # TEMPORARY: envelope capture, see docs/envelope-capture.md | |||
There was a problem hiding this comment.
SENTRY_AUTH_TOKEN can leak through captured Linux Breakpad minidumps
Capture-mode desktop jobs still expose the real SENTRY_AUTH_TOKEN to the integration-test process. The Linux Breakpad crash test can include that inherited environment in its minidump, which is stored verbatim and uploaded in downloadable envelope artifacts; unset or replace the token during capture mode.
Evidence
.github/workflows/test-run-desktop.ymlplacessecrets.SENTRY_AUTH_TOKENin job-levelenv, so the Linux Breakpad test process inherits it even whenSENTRY_DSNpoints to the local capture server.Integration.Tests.ps1skips Sentry API validation in capture mode but does not removeSENTRY_AUTH_TOKEN; the Linux matrix explicitly runs thebreakpadbackend.envelope-capture-server.pywrites multipart minidump request bodies directly totest/IntegrationTest/envelopes/, andtest-run-desktop.ymluploads that directory;ci.ymlsubsequently merges the artifacts intoenvelopes-allwithout redaction.- Linux Breakpad minidumps capture the crashed process environment, allowing the inherited authentication token to become part of the uploaded artifact.
Identified by Warden · security-review · WM6-GS9
There was a problem hiding this comment.
Fix attempt detected (commit 2f6508a)
Capture mode and artifact handling were refactored, but test-run-desktop.yml still exposes the real SENTRY_AUTH_TOKEN at job scope and Integration.Tests.ps1 never unsets or replaces it before launching the Linux Breakpad process.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
There was a problem hiding this comment.
Fix attempt detected (commit 8c913b7)
The commit reworked capture mode and made it opt-in, but capture jobs still pass the real SENTRY_AUTH_TOKEN into test-run-desktop and never unset or replace it before Linux Breakpad processes can include it in minidumps.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
There was a problem hiding this comment.
Fix attempt detected (commit b996a28)
The commit refactors capture mode and makes it opt-in, but Linux desktop capture jobs still pass SENTRY_AUTH_TOKEN at job scope and never unset or replace it before running Breakpad, so the token can still enter uploaded minidumps.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
There was a problem hiding this comment.
Fix attempt detected (commit 8c6e216)
The commit adds capture-mode handling and routes desktop envelopes to local artifacts, but test-run-desktop.yml still exports the real SENTRY_AUTH_TOKEN unconditionally, so Linux Breakpad minidumps can still capture and expose it.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
There was a problem hiding this comment.
Fix attempt detected (commit 50be50c)
The capture workflow was refactored and made opt-in, but capture-mode desktop jobs still pass the real SENTRY_AUTH_TOKEN into the test process and never unset or replace it, so Linux Breakpad minidumps can still contain the token.
The original issue appears unresolved. Please review and try again.
Evaluated by Warden
| uses: ./.github/workflows/test-build-android.yml | ||
| with: | ||
| unity-version: ${{ matrix.unity-version }} | ||
| capture: ${{ inputs.capture-corpus || false }} |
There was a problem hiding this comment.
Capture artifacts expose the Sentry auth token used by Android symbol uploads
When capture mode is enabled, Android passes the real SENTRY_AUTH_TOKEN to sentry-cli; the proguard upload reaches the capture server, which stores its authentication headers in .meta.json files that are then published in a 14-day corpus artifact accessible to artifact readers.
Evidence
test-build-android.ymlenablesSENTRY_CAPTURE_PATHfor capture runs while injectingsecrets.SENTRY_AUTH_TOKENinto the Unity container;ci.ymlforwards the manualcapture-corpusinput to this workflow.build-project.ps1changes onlySENTRY_URLin capture mode, whileCliConfigurationreads the real token andSentryCli.CreateSentryPropertieswrites it asauth.tokenfor Gradle uploads.- Android builds force minification, and
DebugSymbolUploadregistersupload-proguardusingsentry.properties; this request is not handled by the capture server's/chunk-upload/or/assemble/branches. - The capture server's general POST handler persists
dict(self.headers)in each.meta.json, andtest-build-android.ymluploadstest/IntegrationTest/capture/withretention-days: 14.
Identified by Warden · security-review · 7XE-Q2X
do not merge. this is just harvesting envelopes.
#skip-changelog