Skip to content

Commit

Permalink
[actions] restrict action permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 15, 2022
1 parent 997044d commit e45d713
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: node.js < 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: pretest/posttest'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
3 changes: 3 additions & 0 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: node.js >= 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ name: Automatic Rebase

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
contents: write # for ljharb/rebase to push code to rebase
pull-requests: read # for ljharb/rebase to get info about PR

name: "Automatic Rebase"

runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/require-allow-edits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Require “Allow Edits”

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR

name: "Require “Allow Edits”"

runs-on: ubuntu-latest
Expand Down

0 comments on commit e45d713

Please sign in to comment.