Skip to content

[MCP]: Configured secrets remain visible in console log artifacts #41509

Closed

Description

What's going on?

--secrets redacts matching values in MCP responses and page snapshots, but generated console-*.log artifacts still contain the raw value.

Reproduction

  1. Configure PASSWORD=password123 in a secrets file.
  2. Use browser_type with text: "PASSWORD" on a page that logs the field value.
  3. Inspect the response and .playwright-mcp/console-*.log.

Response:

<secret>PASSWORD</secret>

Console artifact:

Text: password123

Reproduced on main. tests/mcp/secrets.spec.ts covers response redaction but not console artifact redaction.

Expected: when --secrets is configured, generated console artifacts should redact resolved values as <secret>PASSWORD</secret>, matching MCP responses.

Following the contribution guidelines, I'd like to work on this if approved for community contribution. Please assign it to me.

Version

main @ 287ad47 (1.62.0-next)

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions