Auto deploy Preview Deployments in public repos are a security risk #3046
Replies: 2 comments 2 replies
-
I think it would be good to have some option like Currently what I do is I enable automatic preview deployments, but customise deployment hostname for preview deployments to something like |
Beta Was this translation helpful? Give feedback.
-
I would love to see some kind of protection as mentioned here as well. It would be great to be able to use preview deployments in a public repository, but currently I cannot due to security concerns (at least not without setting up custom actions). |
Beta Was this translation helpful? Give feedback.
-
The automatic preview deployments in pull requests are a great feature. But right now, in public repos, they seem to be a security risk.
In a public repository, anyone can open a pull request (unless you're on a paid GitHub plan I think, where you can configure who can open a Pull Request). This means that, when preview deployments are enabled, anyone can trigger a new preview deployment and deploy their code by opening a pull request. A malicious actor can access secret environment variables and execute all kinds of shady code. Depending on the domain setup, the domain will also look plausible, it has an SSL certificate, and can be used for social engineering attacks.
Alternatively to the preview deployments feature, I guess you could use a webhook in a GitHub action, but it's not as good as the Preview Deployment feature.
Please correct me if I'm missing any obvious features that already exist.
Beta Was this translation helpful? Give feedback.
All reactions