Skip to content

--dry-run prints secret values in plain text #103

Closed

Description

@joeblew999

cf version: 1.0.0-beta.5, macOS

What happens: --dry-run prints the request body in full, including secret values:

cf workers secrets update API_KEY --worker example --type secret_text --text 'hunter2-secret' --dry-run
  "bodyKind": "json",
  "body": {
    "text": "hunter2-secret",

--dry-run is exactly what people paste into issues, PRs, CI logs and agent transcripts, so the secret leaks there.

Expected: redact the values of secret fields (text for secret_text, and any field the spec marks as sensitive) in dry-run output, e.g. "text": "<redacted, 14 chars>", with an opt-in flag to show them.

Found while evaluating cf for a dev workflow: https://github.com/joeblew999/cf-cli-test (FINDINGS.md, findings/).

Activity

  1. tonydehnke commented on Oct 1, 2026

    @tonydehnke

    Confirmed on cf 1.0.0-beta.9 using only a synthetic dummy value: cf workers secrets update DUMMY --worker synthetic-example --type secret_text --text DUMMY_NOT_A_SECRET --dry-run still includes the literal value in body.text.

    No real secret was supplied, and dry-run did not mutate a Worker. Related secure-input request: #150 (stdin/hidden prompt); redaction is still needed even when secure input is added.

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