zed/.github/workflows
Marshall Bowers 13c14d9b96
Proxy Danger requests through a proxy service (#10395)
This PR updates Danger to proxy its requests to GitHub through a proxy
service.

## Motivation

Currently Danger is not able to run on PRs opened from forks of Zed.

This is due to GitHub Actions' security policies. Forks are not able to
see any of the repository secrets, and the built-in
`secrets.GITHUB_TOKEN` has its permissions
[restricted](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
to only reads when running on forks.

I asked around on the Danger repo, and some big projects
(DefinitelyTyped) are working around this by using a publicly-listed
(although slightly obfuscated) token:
https://github.com/danger/danger-js/issues/918#issuecomment-2048629487.

While this approach is _probably_ okay given the limited scope and
permissions of the GitHub token, I would still prefer a solution that
avoids disclosing the token at all.

## Explanation

I ended up writing a small proxy service, [Danger
Proxy](https://github.com/maxdeviant/danger-proxy), that can be used to
provide Danger with the ability to make authenticated GitHub requests,
but without disclosing the token.

From the README:

> Danger Proxy will:
>
> - Proxy all requests to `/github/*` to the GitHub API. The provided
GitHub API token will be used for authentication.
> - Restrict requests to the list of repositories specified in the
`ALLOWED_REPOS` environment variable.
> - Restrict requests to the subset of the GitHub API that Danger
requires.

I have an instance of this service deployed to
[danger-proxy.fly.dev](https://danger-proxy.fly.dev/).

Release Notes:

- N/A
2024-04-11 00:01:20 -04:00
..
ci.yml Check license generation for every PR to avoid license-less crate additions (#10033) 2024-04-01 12:16:16 +03:00
danger.yml Proxy Danger requests through a proxy service (#10395) 2024-04-11 00:01:20 -04:00
deploy_collab.yml
publish_extension_cli.yml Fix incorrect git ref check in publish extension cli workflow 2024-03-19 14:51:46 -07:00
randomized_tests.yml
release_actions.yml
release_nightly.yml Initial Linux nightly bundles upload (#8913) 2024-03-07 23:22:53 +02:00
update_all_top_ranking_issues.yml Bump Python version in actions 2024-04-05 08:24:00 -04:00
update_weekly_top_ranking_issues.yml Bump Python version in actions 2024-04-05 08:24:00 -04:00