Skip to content

Commit

Permalink
Try to lock down workflow permissions.
Browse files Browse the repository at this point in the history
Note that testing will occur only after this commit lands...

Change-Id: Ib7ef2a73e743cb48774e96f86321c2fcc058f0b4
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62350
Reviewed-by: Alex Chernyakhovsky <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Jan 15, 2024
1 parent c042630 commit 32c181e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI (Bazel)
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI (CMake)
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build-linux:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build-appleclang:
runs-on: macos-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ on:
pull_request_target:
branches: [main]
types: [opened]
permissions:
contents: read
jobs:
close:
permissions:
contents: read
# We have to use two different APIs below,
# so just grant two different permissions.
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
build:
required: true
type: number
permissions:
contents: read
jobs:
wheel-linux:
name: Linux ${{ matrix.os }}, ${{ matrix.arch.name }}, Python ${{ matrix.ver }}
Expand Down

0 comments on commit 32c181e

Please sign in to comment.