Open heurtematte opened 3 months ago
I see, although it seems like a GitLab limitation with masking variables. I guess we could implement an additional safety net like https://stackoverflow.com/a/48019999 but it seems a bit tedious and error prone (easy to forget portions of code) 🤔. Do you see another solution?
This is at least a nice workaround at the moment.
For future use, I would suggest to prefix all token. In gitlab pattern like glpat-
are automatically masked.
Gitlab seems to have this feature: CI_TOKEN_MASK_PREFIXES
, according to this MR https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100882, but I have never been able to make it work.
Setting script to debug mode exposes secrets in logs.
Root cause:
Avoid string manipulation with secrets.
Logs:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is exposed.