-
Notifications
You must be signed in to change notification settings - Fork 486
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
OIDC fails for pull request from fork #373
Comments
I did a diff on the Env of the container between a successful run where I do the diff within the same repo (here) and a failed run where I did the pull request between forks (here), and what stands out is that the successful one has this environment variable set:
but the failed attempt does not set it. |
Oh ... so it looks like you need the |
Would it be possible to fail with a different error message? |
Thanks! This is super useful! |
…anch (#362) **Description of your changes:** - Adds a Github action to test the cognito terraform module as well. We hope to use a test driver approach for all terraform code moving forward because we have multiplied our test matrix*3. - The IAM role is configured to only be able to assume role only from within the Github action from this repository - Filter branches for website build. Everytime someone creates a branch in this repo it pushes website to gh-pages branch see istio and knative folders for example. PR test cannot be configured to run on pull request from fork for 2 limitations related to security: 1. OIDC cannot be accessed in forks: aws-actions/configure-aws-credentials#373 1. Secrets are also not passed to actions triggered from forks. We are not really storing secrets but using it to just for abstraction https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token > Note: Workflow runs triggered by Dependabot pull requests run as if they are from a forked repository, and therefore use a read-only GITHUB_TOKEN. These workflow runs cannot access any secrets. See ["Keeping your GitHub Actions and workflows secure: Preventing pwn requests"](https://securitylab.github.com/research/github-actions-preventing-pwn-requests) for strategies to keep these workflows secure. Will merge #357 after this By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
I have a pull request from a fork:
aws-samples/amazon-codeguru-samples#10
both the fork and the original repo are allow-listed in my role:
when I trigger only on pull_request, the action fails to get credentials:
https://github.com/aws-samples/amazon-codeguru-samples/runs/5030685457?check_suite_focus=true
However, when I trigger on push it works:
https://github.com/martinschaef/amazon-codeguru-samples/runs/5030736213?check_suite_focus=true
Any idea how to fix that? This makes it hard to use pull-request triggers with code guru
The text was updated successfully, but these errors were encountered: