Skip to content

Commit 3777bfa

Browse files
authored
Scope down GitHub Token Permissions (#7640)
* Scope down GitHub token permissions for writeme.yml, yaml-lint.yml, lint-php.yml, lint-ruby.yml, lint-kotlin.yml, and lint-javascript.yml
1 parent 3043932 commit 3777bfa

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

.github/workflows/lint-javascript.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy
44
pull_request:
55
workflow_dispatch:
66

7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
lint:
913
name: Lint Javascript

.github/workflows/lint-kotlin.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy
44
workflow_dispatch:
55
pull_request:
66

7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
ktlint:
913
name: Lint Kotlin

.github/workflows/lint-php.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on: # yamllint disable-line rule:truthy
88
- ".github/linters/phpcs.xml"
99
- ".github/workflows/php-lint.yml"
1010

11+
12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
phpcs:
1317
name: "PHP Linter"

.github/workflows/lint-ruby.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy
44
pull_request:
55
workflow_dispatch:
66

7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
rubocop:
913
name: RuboCop

.github/workflows/writeme.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on: # yamllint disable-line rule:truthy
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14+
15+
permissions:
16+
contents: read
17+
1418
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1519
jobs:
1620
# This workflow contains a single job called "build"

.github/workflows/yaml-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy
44
pull_request:
55
workflow_dispatch:
66

7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
yamllint:
913
name: Lint Yaml

0 commit comments

Comments
 (0)