Skip to content

Commit

Permalink
chore: Set permissions for GitHub actions (#8550)
Browse files Browse the repository at this point in the history
Restrict the GitHub token permissions only to just what is required and make them read-only where possible.

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
  • Loading branch information
neilnaveen committed Jul 4, 2022
1 parent 8494f75 commit f135bfa
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-cli.yml
Expand Up @@ -8,8 +8,13 @@ on:
env:
CI: true

permissions:
contents: read

jobs:
build_cli:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
runs-on: macos-11
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-tests.yml
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Expand Up @@ -9,6 +9,9 @@ on:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-insiders.yml
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [master]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -4,6 +4,9 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit f135bfa

Please sign in to comment.