mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-06 17:35:21 -05:00
[GH-ISSUE #960] [BUG] Secret with $ character gets replaced / treated as a placeholder #7606
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rsocko on GitHub (Nov 4, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/960
When a secret (or I assume a variable) has $ character within its value, it can get treated as if it is itself a placeholder to be replaced by the variable/secret replacement logic.
Details & Repro:
somewhere in the middle and Komodo treats everything after the(up until a space I believe) as a variable to replace.It would appear that perhaps Komodo is making multiple passes at the variable replacement and also seems to perhaps use $ alone as part of the regex / pattern to match to identify a variable or secret to be replaced.
This feels similar in nature to: https://github.com/moghtech/komodo/issues/644#issuecomment-3483271570 whereby a secret value that matches the service name is being treated oddly.
@mbecker20 commented on GitHub (Nov 4, 2025):
Komodo only does
${VAR}stype interpolation for its own config filescore.config.tomlandperiphery.config.toml, otherwise it only does[[VAR]]style. Can you clarify the situation?@rsocko commented on GitHub (Nov 4, 2025):
I will try a more detailed repro so that I can confirm what I'm seeing.
On quick review - the secret value was just a string with $ in the middle of it - no { } pr characters included.
I am going to recreate the stack with the secret included to pull the logs and be more specific of what I am seeing.
@bastienlc commented on GitHub (Mar 22, 2026):
I had a similar issue but the root cause is docker compose interpolation.
I'm using Komodo to inject variables in my docker compose services, typically in the stack configuration I have:
And in the docker-compose.yml file:
If
KOMODO_VARcontainssigns, things can get tricky. I see in the `.env` generated by Komodo that the value is rendered correctly there. The issue appears when docker compose does its interpolation. One solution is to escapesigns by replacing them by $$ inKOMODO_VAR.Having Komodo automatically escape these characters could be a nice feature!