Skip to content

Commit

Permalink
modify job permissions (#1931)
Browse files Browse the repository at this point in the history
Some of the jobs has unnecessary `read-all` access, this PR modifies the
default access to none and a job can overwrite the permission.
  • Loading branch information
cuixq authored Jan 25, 2024
1 parent aa58453 commit e484ee8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
branches: [ master ]


permissions: read-all
permissions: {}

jobs:
analyze:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ on:
merge_group:
branches: [ master ]

permissions: read-all
permissions:
contents: read

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ master ]

# Declare default permissions as read only.
permissions: read-all
permissions: {}

jobs:
analysis:
Expand Down

0 comments on commit e484ee8

Please sign in to comment.