#11380·windmill

[Security/UI] Toggling "Secret" back ON does not re-mask an already-revealed variable value in the edit form

Author: YashKushalvardhanCreated Sep 26, 2026Updated Sep 26, 2026

Describe the bug

When editing a Variable marked as "Secret", the value is hidden by default and requires clicking "Load secret value" to reveal it (which correctly triggers an audit log entry, as noted in the UI). However, if the "Secret" toggle is turned OFF, the value becomes visible in plaintext immediately, without requiring "Load secret value" or generating the same audit action. If the "Secret" toggle is then turned back ON, the value remains visible in plaintext in the form instead of being re-masked.

Steps to reproduce

  1. Open an existing Variable marked as "Secret" (Variables > Edit)
  2. Note the value is hidden, with a "Load secret value" button shown
  3. Toggle "Secret" OFF
  4. Observe the value becomes visible in plaintext immediately
  5. Toggle "Secret" back ON
  6. Observe the value remains visible in plaintext instead of being re-masked

Expected behavior

  • Turning "Secret" OFF should not silently reveal the plaintext value without the same explicit action/audit trail as "Load secret value"
  • Turning "Secret" back ON should re-mask the value in the form, consistent with the protection the "Secret" flag is meant to provide

Actual behavior

The value is revealed without the intended safeguard when toggling OFF, and remains revealed even after re-enabling "Secret" in the same editing session.

Environment

  • Windmill version: CE v1.818.0-4-gc2d8997549
  • Deployment: Docker Compose (local)
  • OS: Windows
  • Browser: Chrome

Screen recording

https://github.com/user-attachments/assets/015b2b58-2844-431d-bbc5-581feac29a82