GitHub Workflows security hardening (#10843)

* 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>
pull/11323/head
Alex 2 years ago committed by Mike Kruskal
parent 1b64b75716
commit ef7c9fd067
  1. 2
      .github/workflows/codespell.yml
  2. 4
      .github/workflows/generate_files.yml
  3. 3
      .github/workflows/objc_cocoapods.yml
  4. 3
      .github/workflows/php-ext.yml
  5. 3
      .github/workflows/update_php_repo.yml

@ -3,6 +3,8 @@
# https://github.com/codespell-project/codespell
name: codespell
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
codespell:
name: Check for spelling errors

@ -9,8 +9,12 @@ on:
# to exclude it.
- '!21.x'
permissions: {}
jobs:
cmake:
permissions:
contents: write # for git push
if: github.repository == 'protocolbuffers/protobuf'
runs-on: ubuntu-latest

@ -18,6 +18,9 @@ on:
- '!objectivec/ProtocolBuffers_*.xcodeproj/**'
- '!objectivec/Tests/**'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
pod-lib-lint:
runs-on: macos-latest

@ -4,6 +4,9 @@ on:
- push
- pull_request
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build-php:
name: Build PHP extension

@ -6,6 +6,9 @@ on:
- v[0-9]+.[0-9]+
- v[0-9]+.[0-9]+-rc[0-9]+
permissions:
contents: read # to fetch code in 'Clone protobuf' (actions/checkout)
jobs:
update-repo:
name: Update PHP Repo

Loading…
Cancel
Save