[đ Bug]: Secrets with trailing spaces in name appear in UI but cannot be accessed or deleted
Describe the bug When a secret is added in Keep for a workflow, if the secretâs name ends with a trailing space character ("MY_SECRET " instead of "MY_SECRET"), it becomes visible in the UI but cannot be deleted, updated, or accessed through normal operations.
To Reproduce Steps to reproduce the behavior:
-
Open Keep and navigate to workflow secrets.
-
Add a new secret with a name that includes a trailing space (e.g.,
API_KEY). -
Save the secret.
-
Observe that the secret is listed in the UI.
-
Attempt to:
- Access the secret in the workflow.
- Delete the secret.
- Update the secret.
Expected behavior Trailing spaces in secret names should either:
-
Be automatically trimmed on creation, or
-
Be preserved but fully accessible and deletable like normal secrets.
Screenshots
Hi @woelfel-tn! I'm Dosu and Iâm helping the keep team.
This is a confirmed bug: secret names in Keep are treated as exact string keys, so trailing spaces are preserved and become part of the identifier. There is no trimming or validation for whitespace in secret names during creation, update, or deletionâeither in the backend or API. As a result, secrets with trailing spaces can only be accessed, updated, or deleted if you provide the exact name (including the space) in all operations. If the UI or API strips or fails to match the space, youâll see errors like âSecret not foundâ even though the secret is visible in the UI. This is a design limitation, not currently documented or tracked as a known issue in the project.
There are no recent changes or discussions addressing this, and no built-in workaround except to ensure you always use the exact secret name (including any spaces) for all operations. To avoid this, itâs best to avoid using trailing spaces in secret names until the product adds validation or normalization for secret identifiers.
References:
- Secret model and exact key handling
- Secret manager logicâno trimming or sanitization
- Workflow secret APIâkeys used as-is
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report đ | Other  Â
Â