-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scope wildcards in user environment variables not working #13474
Comments
Related #12877 |
Hi @szab100, do you mean the variables from https://gitpod.io/variables? if so, how and where are you trying to use them or pass them to an extension if you are? Also, could you share the extension that you tested with? AFAIK, it should work. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey @axonasif, this was reported quite a while ago, but I just tried to recollect my thoughts. And yes, this is about the user-configured env variables. The original issue was that if the scope was set to And yes, the additional note on the IDE extensions was that even when I set env vars to either global or fully matching repo scope, the env vars were visible in SSH and terminals started from the IDEs, but a VSCode extension that was expecting those env vars could not see the env vars I configured (don't remember which extension). I thought this was because the IDE process may not have been spawned from a context where the user env vars were already set. |
Bug description
It seems that using wildcards (*) in the scopes of user env variables are not working, env vars are only visible in workspaces if the scope is either / or fully qualified (entirely matching the workspace context's owner/repository).
Steps to reproduce
(Self-Hosted: 2022.08.0)
Workspace affected
No response
Expected behavior
Example repository
No response
Anything else?
The current scope pattern does not seem to take the git provider into account, so the scope of git-org-name/repo-name is matching both the repository github.mycompany.com/git-org-name/repo-name and github.com/git-org-name/repo-name. This is a potentially exploitable security vulnerability, so supporting an optional (backward compatible) additional provider prefix would be preferred, eg all of the following should be valid scopes:
github.mycompany.com/git-org-name/repo-name
==> should match only github.mycompany.com providergit-org-name/repo-name
==> should match any providergithub.com/git-org-name/repo-name
==> should match only github.com providerEnv variables do not seem to readable by IDE processes. There are several IDE extensions that support taking secrets & other values from OS environment variables, so Gitpod should set the project- and user-specific env variables before spawning the IDE processes.
The text was updated successfully, but these errors were encountered: