Skip to content

Conversation

@sashashura
Copy link
Contributor

This PR adds explicit permissions section to workflows. This is a security best practice because by default workflows run with extended set of permissions (except from on: pull_request from external forks). 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 or compromised third party tool or action) is restricted.
It is recommended to have most strict permissions on the top level and grant write permissions on job level case by case.

@zhangskz
Copy link
Member

There are merge conflicts in .github/workflows/generated_cmake.yml that are preventing some integration tests from running.

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
@sashashura
Copy link
Contributor Author

rebased

@sashashura
Copy link
Contributor Author

Ready for review

@zhangskz zhangskz self-requested a review December 1, 2022 15:58
@mkruskal-google mkruskal-google merged commit 31c3aee into protocolbuffers:main Dec 15, 2022
mkruskal-google pushed a commit to mkruskal-google/protobuf that referenced this pull request Dec 15, 2022
* build: harden codespell.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden generated_cmake.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden objc_cocoapods.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden php-ext.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden update_php_repo.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>
copybara-service bot pushed a commit that referenced this pull request Dec 16, 2022
Roll forward of #10843 after accidental direct merge

Closes #11323

COPYBARA_INTEGRATE_REVIEW=#11323 from mkruskal-google:restore-hardening ef7c9fd
PiperOrigin-RevId: 495885677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants