-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update github action gradle-check to use pull_request_target for accessing token #3728
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
CEHENKLE
approved these changes
Jun 28, 2022
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
4455b79
to
661855c
Compare
5 tasks
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.0 2.0
# Navigate to the new working tree
cd .worktrees/backport-2.0
# Create a new branch
git switch --create backport/backport-3728-to-2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4f7bf08c1eaf0a4a37597920119616e862b5f6ed
# Push it to GitHub
git push --set-upstream origin backport/backport-3728-to-2.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.0 Then, create a pull request where the |
imRishN
pushed a commit
to imRishN/OpenSearch
that referenced
this pull request
Jul 3, 2022
…ssing token (opensearch-project#3728) * Check out gradle Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Tweak titles Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
mch2
pushed a commit
to mch2/OpenSearch
that referenced
this pull request
Jul 5, 2022
…ssing token (opensearch-project#3728) (opensearch-project#3730) * Check out gradle Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Tweak titles Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> (cherry picked from commit 4f7bf08) Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
mch2
added a commit
that referenced
this pull request
Jul 6, 2022
* [Backport 1.x] Add gradle check test for github workflows (Testing again) (#3724) * [Backport 1.x] Add gradle check test for github workflows (Testing again) * [Backport 1.x] Add gradle check test for github workflows (Testing again) Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Remove linter Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Update github action gradle-check to use pull_request_target for accessing token (#3728) (#3730) * Check out gradle Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Tweak titles Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> (cherry picked from commit 4f7bf08) Co-authored-by: Peter Zhu <zhujiaxi@amazon.com> * Move gradle-check code to its own scripts and upload codecov (#3742) (#3744) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Add more improvements on comments handling Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> * Add more comments Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <zhujiaxi@amazon.com> Co-authored-by: Peter Zhu <zhujiaxi@amazon.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 1.x
backport 2.x
Backport to 2.x branch
backport 2.0
Backport to 2.0 branch
backport 2.1
bug
Something isn't working
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Peter Zhu zhujiaxi@amazon.com
Description
Update github action gradle-check to use pull_request_target for accessing token
Since Jenkins workflow needs to be triggered through github workflow with a token,
pull_request
does not allow fork repo to read secret just to be safe, therefore change to usepull_request_target
for this access.https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
Workflows triggered via pull_request_target have write permission to the target repository. They also have access to target repository secrets. The same is true for workflows triggered on pull_request from a branch in the same repository, but not from external forks. The reasoning behind the latter is that it is safe to share the repository secrets if the user creating the PR has write permission to the target repository already.
Issues Resolved
opensearch-project/opensearch-build#851
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.