Description
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)
- Create an environment variable using * in the repository name, eg "myproject*", which should match "myproject-X", "myprojectXY", etc.
- Verify that the newly added env var is NOT accessible from workspaces where the context repo url does match the given pattern.
- Verify that the newly added env var is accessible, if you change the scope to the fully qualified owner/repository scope, without wildcards in the repository name (wildcards in the git-org / owner part seems to be working fine).
Workspace affected
No response
Expected behavior
- The wildcard matching in repository names should be fixed.
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 provider
git-org-name/repo-name
==> should match any provider
github.com/git-org-name/repo-name
==> should match only github.com provider -
Env 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status