Skip to content

[api review 1.65] Reporter secrets option #43795

Closed

Description

PR #43334, Issue #38673

  • should trim titles at the end instead of in the worker, so that redacting works - double check that, add a test
  • support .env file in addition to name/value pairs
  • secrets are redacted from all plain-text attachments
  • all zip or binary attachments containing secrets are skipped by the reporter, perhaps an annotation is added to indicate that
  • docs explain the situation with the trace explicitly - it will be skipped unless you pass secrets to the trace options as well

Part of the 1.65 API review: #43790

Activity

  1. github-actions commented on Oct 30, 2026

    @github-actions
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Hi, I'm the Playwright bot and I checked this on Linux.

    Reproduced on 1.65.0-next (1d5572d5ddfb7f3c8dfbbe19c8e97def0b2738db). Subtitles and parameters were truncated before redaction, and file attachments bypassed redaction. The proposed fix covers all five items: later truncation, config-relative dotenv files, text attachment redaction, binary/ZIP omission with an explanatory notice, and explicit trace documentation.

    Reproduction and verification

    The regression fills a field whose label and value are the same 335-character secret:

    const secret = 'long-' + 'password123'.repeat(30);
    await page.setContent(`<input aria-label="${secret}">`);
    await page.getByLabel(secret).fill(secret);

    With that value configured as a reporter secret, the original reporter receives a truncated, partly exposed value instead of one secret placeholder. The same test attaches a text file, a binary buffer, and a ZIP with a compressed secret. A reporter without secrets checks that its data stays unchanged.

    Implementation Chromium Firefox WebKit
    Original source at the SHA above All three extended tests fail Not run Not run
    Proposed fix 3 pass 3 pass 3 pass

    These are headless runs on Linux. An unredacted trace is replaced with an omission notice; a trace recorded with trace secrets is kept and its decompressed entries contain no secret.

    The neighboring reporter/step suites passed 442 tests, with 8 skips; four Git fixture tests initially failed because this runner restricts bare repositories, then all four passed with access enabled only for the test process. All 59 trace tests, the build, and the full lint/type checks pass.

    Draft PR: #43807

    Triaged on Linux by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions