react-native-macos/.github
Alex a5cf3a46ab GitHub Workflows security hardening (#34541)
Summary:
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>

This PR adds explicit [permissions section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions) to workflows. This is a security best practice because by default workflows run with [extended set of permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) (except from `on: pull_request` [from external forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an [injection](https://securitylab.github.com/research/github-actions-untrusted-input/) or compromised third party tool or action) is restricted.
It is recommended to have [most strict permissions on the top level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions) and grant write permissions on [job level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) case by case.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Added] - Explicit security permission definitions in autorebase workflow

Pull Request resolved: https://github.com/facebook/react-native/pull/34541

Reviewed By: cipolleschi

Differential Revision: D39544656

Pulled By: cortinico

fbshipit-source-id: 4918ee83fab7172a1d98689f10102fe2db2b17b7
2022-09-15 09:31:41 -07:00
..
ISSUE_TEMPLATE Fix broken `ISSUE_TEMPLATE` due to extra `:` (#33892) 2022-05-23 09:17:31 -07:00
workflows GitHub Workflows security hardening (#34541) 2022-09-15 09:31:41 -07:00
CODEOWNERS Added @matt-oakes as CODEOWNER of the ESLint package (#27689) 2020-01-06 16:13:30 -08:00
ISSUE_TEMPLATE.md Issues without any template will get closed (#27996) 2020-02-07 17:55:52 -08:00
PULL_REQUEST_TEMPLATE.md (PULL_REQUEST_TEMPLATE) update link to changelog documentation (#34206) 2022-07-19 05:47:17 -07:00
RELEASE_TEMPLATE.md Circle CI: Create GiHub Release draft when bumping version 2022-07-14 13:42:08 -07:00
SUPPORT.md Fix reactiflux url (#30709) 2021-01-14 14:58:10 -08:00
respond-to-issue-based-on-label.yml Remove action to close upgrade-related issues 2021-10-25 10:48:22 -07:00