Skip to content

chore: permissions for github actions#14767

Merged
nija-at merged 5 commits intomasterfrom
nija-at/yarn-upgrade-v2
May 19, 2021
Merged

chore: permissions for github actions#14767
nija-at merged 5 commits intomasterfrom
nija-at/yarn-upgrade-v2

Conversation

@nija-at
Copy link
Copy Markdown
Contributor

@nija-at nija-at commented May 19, 2021

By default, all Github actions have read permissions via the standard
GITHUB_TOKEN. For jobs that require write permission, explicitly
add the necessary permissions.

In the case of the 'Yarn Upgrade' Github action, separated the
'upgrade' step and the 'pull request' step into separate
jobs to build a better security boundary between the two.

Inspired from: https://github.com/projen/projen/blob/a4f875d07b57f8f8247b9352e34c3c83759afe82/.github/workflows/upgrade-dependencies.yml


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Separated the 'upgrade' step and the 'pull request' step into separate
jobs to build a better security boundary between the two.

The latter requies write permission on the repo to create a pull
request.
@nija-at nija-at requested review from a team, eladb and iliapolo May 19, 2021 11:11
@nija-at nija-at self-assigned this May 19, 2021
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented May 19, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 19, 2021
@nija-at
Copy link
Copy Markdown
Contributor Author

nija-at commented May 19, 2021

Testing

Ran the workflow on my private fork to provide that it works - https://github.com/nija-at/aws-cdk/actions/runs/856551188.
It created this PR - nija-at#1

Copy link
Copy Markdown
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nija-at nija-at changed the title chore: re-enable upgrade Github action chore: set permissions for github actions May 19, 2021
@nija-at nija-at requested review from a team and iliapolo May 19, 2021 13:26
@nija-at nija-at added the pr/do-not-merge This PR should not be merged at this time. label May 19, 2021
@nija-at nija-at changed the title chore: set permissions for github actions chore: permissions for github actions May 19, 2021
@nija-at nija-at removed the pr/do-not-merge This PR should not be merged at this time. label May 19, 2021
@nija-at nija-at merged commit 7013f58 into master May 19, 2021
@nija-at nija-at deleted the nija-at/yarn-upgrade-v2 branch May 19, 2021 13:59
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: e5c38e2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
By default, all Github actions have read permissions via the standard
`GITHUB_TOKEN`. For jobs that require write permission, explicitly
add the necessary permissions.

In the case of the 'Yarn Upgrade' Github action, separated the
'upgrade' step and the 'pull request' step into separate
jobs to build a better security boundary between the two.

Inspired from: https://github.com/projen/projen/blob/a4f875d07b57f8f8247b9352e34c3c83759afe82/.github/workflows/upgrade-dependencies.yml
dankmemes2020 added a commit to dankmemes2020/aws-cdk that referenced this pull request Sep 21, 2021
Action permissions were restricted in aws#14767 but this broke the stale issue handling action. This opens read permissions and write permissions to PRs for this action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants